mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 03:54:21 +00:00
f0a77e80bf
* fix: add keys to projections * change to multiple tables * merge * change migration version * merge * Update migrations/cockroach/V1.98__keys.sql Co-authored-by: Silvan <silvan.reusser@gmail.com> * Update migrations/cockroach/V1.98__keys.sql Co-authored-by: Silvan <silvan.reusser@gmail.com> * check keys Co-authored-by: Silvan <silvan.reusser@gmail.com>
28 lines
702 B
SQL
28 lines
702 B
SQL
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)
|
|
);
|