zitadel/migrations/cockroach/V1.15__management_project_view.sql
Fabi e63179514c
fix: projects (#221)
* feat: projects and project grants seperated

* fix: tests

* fix: add mock
2020-06-15 14:50:39 +02:00

37 lines
667 B
PL/PgSQL

BEGIN;
DROP TABLE management.granted_projects;
CREATE TABLE management.projects (
project_id TEXT,
creation_date TIMESTAMPTZ,
change_date TIMESTAMPTZ,
project_name TEXT,
project_state SMALLINT,
resource_owner TEXT,
sequence BIGINT,
PRIMARY KEY (project_id)
);
CREATE TABLE management.project_grants (
grant_id TEXT,
creation_date TIMESTAMPTZ,
change_date TIMESTAMPTZ,
project_id TEXT,
project_name TEXT,
org_name TEXT,
org_domain TEXT,
project_state SMALLINT,
resource_owner TEXT,
org_id TEXT,
granted_role_keys TEXT Array,
sequence BIGINT,
PRIMARY KEY (grant_id)
);
COMMIT;