mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-26 20:45:37 +02:00
PR #5765 (MUL-5150) branched before #5841 merged, so both landed a 213 migration and Backend CI's TestMigrationNumericPrefixesStayUniqueAfterLegacySet failed on main. Bump #5765's pair to the next free prefixes, preserving the column-before-index order: 213_chat_session_project -> 214_chat_session_project 214_chat_session_project_index -> 215_chat_session_project_index MUL-5251 Co-authored-by: Bohan-J <bohan@devv.ai> Co-authored-by: multica-agent <github@multica.ai>
8 lines
422 B
SQL
8 lines
422 B
SQL
-- Project deletion clears chat-session references by project_id. Build this
|
|
-- partial index concurrently so the established chat_session write path stays
|
|
-- available throughout rollout. A single statement is required because
|
|
-- CREATE INDEX CONCURRENTLY cannot run inside a transaction.
|
|
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_chat_session_project
|
|
ON chat_session (project_id)
|
|
WHERE project_id IS NOT NULL;
|