diff --git a/server/migrations/214_chat_session_project.up.sql b/server/migrations/214_chat_session_project.up.sql index 880d4f67d..86db0e7cf 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.sql similarity index 100% rename from server/migrations/213_vcs_integration.down.sql rename to server/migrations/216_vcs_integration.down.sql diff --git a/server/migrations/213_vcs_integration.up.sql b/server/migrations/216_vcs_integration.up.sql similarity index 100% rename from server/migrations/213_vcs_integration.up.sql rename to server/migrations/216_vcs_integration.up.sql diff --git a/server/migrations/214_vcs_connection_workspace_index.down.sql b/server/migrations/217_vcs_connection_workspace_index.down.sql similarity index 100% rename from server/migrations/214_vcs_connection_workspace_index.down.sql rename to server/migrations/217_vcs_connection_workspace_index.down.sql diff --git a/server/migrations/214_vcs_connection_workspace_index.up.sql b/server/migrations/217_vcs_connection_workspace_index.up.sql similarity index 100% rename from server/migrations/214_vcs_connection_workspace_index.up.sql rename to server/migrations/217_vcs_connection_workspace_index.up.sql diff --git a/server/migrations/215_vcs_pull_request_workspace_index.down.sql b/server/migrations/218_vcs_pull_request_workspace_index.down.sql similarity index 100% rename from server/migrations/215_vcs_pull_request_workspace_index.down.sql rename to server/migrations/218_vcs_pull_request_workspace_index.down.sql diff --git a/server/migrations/215_vcs_pull_request_workspace_index.up.sql b/server/migrations/218_vcs_pull_request_workspace_index.up.sql similarity index 100% rename from server/migrations/215_vcs_pull_request_workspace_index.up.sql rename to server/migrations/218_vcs_pull_request_workspace_index.up.sql diff --git a/server/migrations/216_vcs_pull_request_connection_index.down.sql b/server/migrations/219_vcs_pull_request_connection_index.down.sql similarity index 100% rename from server/migrations/216_vcs_pull_request_connection_index.down.sql rename to server/migrations/219_vcs_pull_request_connection_index.down.sql diff --git a/server/migrations/216_vcs_pull_request_connection_index.up.sql b/server/migrations/219_vcs_pull_request_connection_index.up.sql similarity index 100% rename from server/migrations/216_vcs_pull_request_connection_index.up.sql rename to server/migrations/219_vcs_pull_request_connection_index.up.sql diff --git a/server/migrations/217_issue_vcs_pull_request_pr_index.down.sql b/server/migrations/220_issue_vcs_pull_request_pr_index.down.sql similarity index 100% rename from server/migrations/217_issue_vcs_pull_request_pr_index.down.sql rename to server/migrations/220_issue_vcs_pull_request_pr_index.down.sql diff --git a/server/migrations/217_issue_vcs_pull_request_pr_index.up.sql b/server/migrations/220_issue_vcs_pull_request_pr_index.up.sql similarity index 100% rename from server/migrations/217_issue_vcs_pull_request_pr_index.up.sql rename to server/migrations/220_issue_vcs_pull_request_pr_index.up.sql diff --git a/server/migrations/218_vcs_commit_status_lookup_index.down.sql b/server/migrations/221_vcs_commit_status_lookup_index.down.sql similarity index 100% rename from server/migrations/218_vcs_commit_status_lookup_index.down.sql rename to server/migrations/221_vcs_commit_status_lookup_index.down.sql diff --git a/server/migrations/218_vcs_commit_status_lookup_index.up.sql b/server/migrations/221_vcs_commit_status_lookup_index.up.sql similarity index 100% rename from server/migrations/218_vcs_commit_status_lookup_index.up.sql rename to server/migrations/221_vcs_commit_status_lookup_index.up.sql