zitadel/migrations/cockroach/V1.106__user_metadata.sql
Livio Amstutz c2e6fd8f40
fix(query): add user metadata projection (#3021)
* fix: add metadata projection

* cleanup
2022-01-18 14:15:00 +01:00

14 lines
345 B
SQL

CREATE TABLE zitadel.projections.user_metadata (
user_id STRING NOT NULL
, resource_owner STRING NOT NULL
, creation_date TIMESTAMPTZ NOT NULL
, change_date TIMESTAMPTZ NOT NULL
, sequence INT8 NOT NULL
, key STRING NOT NULL
, value BYTES
, PRIMARY KEY (user_id, key)
, INDEX idx_ro (resource_owner)
);