feat: connect console to catalog and project keys
This commit is contained in:
1 parent
5e8e462548
commit
ec51e8c802
13 files changed
+503
-22
No files matched your search
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE IF NOT EXISTS model_projects (
|
||||
id varchar(64) PRIMARY KEY,
|
||||
owner_user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
name varchar(80) NOT NULL,
|
||||
description text NOT NULL DEFAULT '',
|
||||
status varchar(16) NOT NULL DEFAULT 'active' CHECK (status IN ('active', 'disabled')),
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
ALTER TABLE platform_api_keys ADD COLUMN IF NOT EXISTS project_id varchar(64) REFERENCES model_projects(id) ON DELETE CASCADE;
|
||||
CREATE INDEX IF NOT EXISTS model_projects_owner_user_id_idx ON model_projects(owner_user_id);
|
||||
CREATE INDEX IF NOT EXISTS platform_api_keys_project_id_idx ON platform_api_keys(project_id);
|
||||
Reference in new issue
Block a user