Rewrite identity and access management
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
8
pkg/coredata/migrations/20251205T150000Z.sql
Normal file
8
pkg/coredata/migrations/20251205T150000Z.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
ALTER TABLE sessions ADD COLUMN tenant_id TEXT;
|
||||
ALTER TABLE sessions ADD COLUMN parent_session_id TEXT REFERENCES sessions(id);
|
||||
|
||||
ALTER TABLE sessions ADD CONSTRAINT session_tenant_check CHECK (
|
||||
(parent_session_id IS NULL AND tenant_id IS NULL) OR
|
||||
(parent_session_id IS NOT NULL AND tenant_id IS NOT NULL)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user