zitadel/migrations/cockroach/V1.98__keys.sql

28 lines
702 B
MySQL
Raw Normal View History

CREATE TABLE zitadel.projections.keys (
id STRING,
creation_date TIMESTAMPTZ NOT NULL,
change_date TIMESTAMPTZ NOT NULL,
resource_owner STRING NOT NULL,
sequence INT8 NOT NULL,
algorithm STRING DEFAULT '' NOT NULL,
use STRING DEFAULT '' NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE zitadel.projections.keys_private(
id STRING REFERENCES zitadel.projections.keys ON DELETE NO ACTION,
expiry TIMESTAMPTZ NOT NULL,
key JSONB NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE zitadel.projections.keys_public (
id STRING REFERENCES zitadel.projections.keys ON DELETE NO ACTION,
expiry TIMESTAMPTZ NOT NULL,
key BYTES NOT NULL,
PRIMARY KEY (id)
);