Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(migrations): resolve VCS migration prefix collision (213-215) and unblock deploy (MUL-3772) (#5883)
Bohan Jiang3f2e1c68d7d7
diff --git a/server/migrations/214_chat_session_project.up.sql b/server/migrations/214_chat_session_project.up.sqlindex 880d4f67db..86db0e7cff 100644--- a/server/migrations/214_chat_session_project.up.sql+++ b/server/migrations/214_chat_session_project.up.sql@@ -4,5 +4,11 @@-- Create/delete handlers serialize on the project row, project deletion clears-- existing references, and daemon claim revalidates workspace ownership before-- injecting any context.+--+-- IF NOT EXISTS because this migration was first shipped as 213_chat_session_project+-- and later renumbered to 214 (#5868, dodging a prefix collision). Environments+-- that already applied it under the old 213 name have the column but not the 214+-- version row, so the runner re-applies it under the new name; without the guard+-- that re-run fails with "column already exists" (SQLSTATE 42701) and blocks deploy.ALTER TABLE chat_session- ADD COLUMN project_id UUID;+ ADD COLUMN IF NOT EXISTS project_id UUID;diff --git a/server/migrations/213_vcs_integration.down.sql b/server/migrations/216_vcs_integration.down.sqlsimilarity index 100%rename from server/migrations/213_vcs_integration.down.sqlrename to server/migrations/216_vcs_integration.down.sqldiff --git a/server/migrations/213_vcs_integration.up.sql b/server/migrations/216_vcs_integration.up.sqlsimilarity index 98%rename from server/migrations/213_vcs_integration.up.sqlrename to server/migrations/216_vcs_integration.up.sqlindex f15f2be6e3..1892030e42 100644--- a/server/migrations/213_vcs_integration.up.sql+++ b/server/migrations/216_vcs_integration.up.sql@@ -17,7 +17,7 @@-- rows below in a single atomic statement). The inline UNIQUE / PRIMARY KEY-- constraints stay — they back the ON CONFLICT upsert targets in vcs.sql.-- Secondary indexes live in follow-up single-statement CREATE INDEX--- CONCURRENTLY migrations (214-218), which cannot share a file with these+-- CONCURRENTLY migrations (217-221), which cannot share a file with these-- CREATE TABLEs.CREATE TABLE IF NOT EXISTS vcs_connection (diff --git a/server/migrations/214_vcs_connection_workspace_index.down.sql b/server/migrations/217_vcs_connection_workspace_index.down.sqlsimilarity index 100%rename from server/migrations/214_vcs_connection_workspace_index.down.sqlrename to server/migrations/217_vcs_connection_workspace_index.down.sqldiff --git a/server/migrations/214_vcs_connection_workspace_index.up.sql b/server/migrations/217_vcs_connection_workspace_index.up.sqlsimilarity index 100%rename from server/migrations/214_vcs_connection_workspace_index.up.sqlrename to server/migrations/217_vcs_connection_workspace_index.up.sqldiff --git a/server/migrations/215_vcs_pull_request_workspace_index.down.sql b/server/migrations/218_vcs_pull_request_workspace_index.down.sqlsimilarity index 100%rename from server/migrations/215_vcs_pull_request_workspace_index.down.sqlrename to server/migrations/218_vcs_pull_request_workspace_index.down.sqldiff --git a/server/migrations/215_vcs_pull_request_workspace_index.up.sql b/server/migrations/218_vcs_pull_request_workspace_index.up.sqlsimilarity index 100%rename from server/migrations/215_vcs_pull_request_workspace_index.up.sqlrename to server/migrations/218_vcs_pull_request_workspace_index.up.sqldiff --git a/server/migrations/216_vcs_pull_request_connection_index.down.sql b/server/migrations/219_vcs_pull_request_connection_index.down.sqlsimilarity index 100%rename from server/migrations/216_vcs_pull_request_connection_index.down.sqlrename to server/migrations/219_vcs_pull_request_connection_index.down.sqldiff --git a/server/migrations/216_vcs_pull_request_connection_index.up.sql b/server/migrations/219_vcs_pull_request_connection_index.up.sqlsimilarity index 100%rename from server/migrations/216_vcs_pull_request_connection_index.up.sqlrename to server/migrations/219_vcs_pull_request_connection_index.up.sqldiff --git a/server/migrations/217_issue_vcs_pull_request_pr_index.down.sql b/server/migrations/220_issue_vcs_pull_request_pr_index.down.sqlsimilarity index 100%rename from server/migrations/217_issue_vcs_pull_request_pr_index.down.sqlrename to server/migrations/220_issue_vcs_pull_request_pr_index.down.sqldiff --git a/server/migrations/217_issue_vcs_pull_request_pr_index.up.sql b/server/migrations/220_issue_vcs_pull_request_pr_index.up.sqlsimilarity index 100%rename from server/migrations/217_issue_vcs_pull_request_pr_index.up.sqlrename to server/migrations/220_issue_vcs_pull_request_pr_index.up.sqldiff --git a/server/migrations/218_vcs_commit_status_lookup_index.down.sql b/server/migrations/221_vcs_commit_status_lookup_index.down.sqlsimilarity index 100%rename from server/migrations/218_vcs_commit_status_lookup_index.down.sqlrename to server/migrations/221_vcs_commit_status_lookup_index.down.sqldiff --git a/server/migrations/218_vcs_commit_status_lookup_index.up.sql b/server/migrations/221_vcs_commit_status_lookup_index.up.sqlsimilarity index 100%rename from server/migrations/218_vcs_commit_status_lookup_index.up.sqlrename to server/migrations/221_vcs_commit_status_lookup_index.up.sql