fix(ci): align B5 schema with tenant isolation
This commit is contained in:
@@ -109,6 +109,7 @@ CREATE TABLE IF NOT EXISTS ai_provider_version_history (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS knowledge_entries (
|
||||
id VARCHAR(36) PRIMARY KEY,
|
||||
project_id VARCHAR(64) NOT NULL DEFAULT 'awoooi',
|
||||
title VARCHAR NOT NULL,
|
||||
content TEXT,
|
||||
entry_type entrytype NOT NULL,
|
||||
@@ -129,6 +130,11 @@ CREATE TABLE IF NOT EXISTS knowledge_entries (
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
-- 2026-05-05 AwoooP Phase 2 tenant isolation: align integration schema with KnowledgeEntryRecord.project_id.
|
||||
ALTER TABLE knowledge_entries
|
||||
ADD COLUMN IF NOT EXISTS project_id VARCHAR(64) NOT NULL DEFAULT 'awoooi';
|
||||
CREATE INDEX IF NOT EXISTS ix_knowledge_entries_project_id
|
||||
ON knowledge_entries(project_id);
|
||||
-- M3 冪等 unique index (incident_id + path_type)
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uix_knowledge_incident_path
|
||||
ON knowledge_entries(related_incident_id, path_type)
|
||||
|
||||
Reference in New Issue
Block a user