fixup! feat(db): adding relational instance table

This commit is contained in:
Iraq Jaber
2025-05-27 15:39:59 +02:00
parent 11d691e190
commit e8fccf28b8
3 changed files with 138 additions and 136 deletions

View File

@@ -1,11 +1,15 @@
-- the projection for instances happens before md/setup/54.go is run,
-- hence why the zitadel schema is added below
CREATE SCHEMA IF NOT EXISTS zitadel;
CREATE TABLE IF NOT EXISTS zitadel.instances(
id TEXT NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
default_org_id TEXT NOT NULL,
iam_project_id TEXT NOT NULL,
console_client_id TEXT NOT NULL,
console_app_id TEXT NOT NULL,
default_language TEXT REFERENCES languages(code),
default_org_id TEXT, -- NOT NULL,
iam_project_id TEXT, -- NOT NULL,
console_client_id TEXT, -- NOT NULL,
console_app_id TEXT, -- NOT NULL,
default_language TEXT, -- NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW(),
updated_at TIMESTAMPTZ DEFAULT NOW(),
deleted_at TIMESTAMPTZ DEFAULT NULL