Skip to content

Commit e0ef4dd

Browse files
committed
remove addtional table for LLM policies
1 parent 1770f67 commit e0ef4dd

File tree

4 files changed

+70
-231
lines changed

4 files changed

+70
-231
lines changed

platform-api/src/internal/database/schema.postgres.sql

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -415,19 +415,6 @@ CREATE TABLE IF NOT EXISTS llm_proxies (
415415
CHECK (status IN ('pending', 'deployed', 'failed'))
416416
);
417417

418-
-- LLM Policies table (for providers and proxies)
419-
CREATE TABLE IF NOT EXISTS llm_policies (
420-
id SERIAL PRIMARY KEY,
421-
organization_uuid VARCHAR(40) NOT NULL,
422-
target_type VARCHAR(20) NOT NULL,
423-
target_handle VARCHAR(255) NOT NULL,
424-
name VARCHAR(255) NOT NULL,
425-
version VARCHAR(50) NOT NULL DEFAULT '1.0.0',
426-
paths TEXT, -- JSON array as TEXT
427-
FOREIGN KEY (organization_uuid) REFERENCES organizations(uuid) ON DELETE CASCADE,
428-
CHECK (target_type IN ('provider', 'proxy'))
429-
);
430-
431418
-- Indexes for better performance
432419
CREATE INDEX IF NOT EXISTS idx_projects_organization_id ON projects(organization_uuid);
433420
CREATE INDEX IF NOT EXISTS idx_organizations_handle ON organizations(handle);
@@ -466,4 +453,3 @@ CREATE INDEX IF NOT EXISTS idx_llm_proxies_org ON llm_proxies(organization_uuid)
466453
CREATE INDEX IF NOT EXISTS idx_llm_proxies_project ON llm_proxies(organization_uuid, project_uuid);
467454
CREATE INDEX IF NOT EXISTS idx_llm_proxies_handle ON llm_proxies(organization_uuid, handle);
468455
CREATE INDEX IF NOT EXISTS idx_llm_proxies_provider ON llm_proxies(organization_uuid, provider);
469-
CREATE INDEX IF NOT EXISTS idx_llm_policies_target ON llm_policies(organization_uuid, target_type, target_handle);

platform-api/src/internal/database/schema.sql

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -415,19 +415,6 @@ CREATE TABLE IF NOT EXISTS llm_proxies (
415415
CHECK (status IN ('pending', 'deployed', 'failed'))
416416
);
417417

418-
-- LLM Policies table (for providers and proxies)
419-
CREATE TABLE IF NOT EXISTS llm_policies (
420-
id INTEGER PRIMARY KEY AUTOINCREMENT,
421-
organization_uuid VARCHAR(40) NOT NULL,
422-
target_type VARCHAR(20) NOT NULL,
423-
target_handle VARCHAR(255) NOT NULL,
424-
name VARCHAR(255) NOT NULL,
425-
version VARCHAR(50) NOT NULL DEFAULT '1.0.0',
426-
paths TEXT, -- JSON array as TEXT
427-
FOREIGN KEY (organization_uuid) REFERENCES organizations(uuid) ON DELETE CASCADE,
428-
CHECK (target_type IN ('provider', 'proxy'))
429-
);
430-
431418
-- Indexes for better performance
432419
CREATE INDEX IF NOT EXISTS idx_projects_organization_id ON projects(organization_uuid);
433420
CREATE INDEX IF NOT EXISTS idx_organizations_handle ON organizations(handle);
@@ -466,4 +453,3 @@ CREATE INDEX IF NOT EXISTS idx_llm_proxies_org ON llm_proxies(organization_uuid)
466453
CREATE INDEX IF NOT EXISTS idx_llm_proxies_project ON llm_proxies(organization_uuid, project_uuid);
467454
CREATE INDEX IF NOT EXISTS idx_llm_proxies_handle ON llm_proxies(organization_uuid, handle);
468455
CREATE INDEX IF NOT EXISTS idx_llm_proxies_provider ON llm_proxies(organization_uuid, provider);
469-
CREATE INDEX IF NOT EXISTS idx_llm_policies_target ON llm_policies(organization_uuid, target_type, target_handle);

platform-api/src/internal/database/schema.sqlite.sql

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -415,19 +415,6 @@ CREATE TABLE IF NOT EXISTS llm_proxies (
415415
CHECK (status IN ('pending', 'deployed', 'failed'))
416416
);
417417

418-
-- LLM Policies table (for providers and proxies)
419-
CREATE TABLE IF NOT EXISTS llm_policies (
420-
id INTEGER PRIMARY KEY AUTOINCREMENT,
421-
organization_uuid VARCHAR(40) NOT NULL,
422-
target_type VARCHAR(20) NOT NULL,
423-
target_handle VARCHAR(255) NOT NULL,
424-
name VARCHAR(255) NOT NULL,
425-
version VARCHAR(50) NOT NULL DEFAULT '1.0.0',
426-
paths TEXT, -- JSON array as TEXT
427-
FOREIGN KEY (organization_uuid) REFERENCES organizations(uuid) ON DELETE CASCADE,
428-
CHECK (target_type IN ('provider', 'proxy'))
429-
);
430-
431418
-- Indexes for better performance
432419
CREATE INDEX IF NOT EXISTS idx_projects_organization_id ON projects(organization_uuid);
433420
CREATE INDEX IF NOT EXISTS idx_organizations_handle ON organizations(handle);
@@ -466,4 +453,3 @@ CREATE INDEX IF NOT EXISTS idx_llm_proxies_org ON llm_proxies(organization_uuid)
466453
CREATE INDEX IF NOT EXISTS idx_llm_proxies_project ON llm_proxies(organization_uuid, project_uuid);
467454
CREATE INDEX IF NOT EXISTS idx_llm_proxies_handle ON llm_proxies(organization_uuid, handle);
468455
CREATE INDEX IF NOT EXISTS idx_llm_proxies_provider ON llm_proxies(organization_uuid, provider);
469-
CREATE INDEX IF NOT EXISTS idx_llm_policies_target ON llm_policies(organization_uuid, target_type, target_handle);

0 commit comments

Comments
 (0)