Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(migrations): renumber the Triage validate migration to 489 (#8452)
Bohan Jiangee1ea34744b3
diff --git a/server/internal/migrations/issue_triage_state_migration_test.go b/server/internal/migrations/issue_triage_state_migration_test.goindex cbafa67a4b..ec7b192705 100644--- a/server/internal/migrations/issue_triage_state_migration_test.go+++ b/server/internal/migrations/issue_triage_state_migration_test.go@@ -7,7 +7,7 @@ import (// TestIssueTriageStateMigration pins the lock shape of the Triage column: 483// registers the CHECK without validating it, so its ACCESS EXCLUSIVE lock never-// covers a scan of the issue table, and 485 runs that scan afterwards under+// covers a scan of the issue table, and 489 runs that scan afterwards under// SHARE UPDATE EXCLUSIVE, which readers and writers pass straight through.// Skipping the scan is only acceptable while both halves still reject an// unknown triage_state on every write, so each step asserts that too.@@ -35,21 +35,21 @@ func TestIssueTriageStateMigration(t *testing.T) {}s.assertTriageStateEnforced(t, ctx, "483")- applyMigrationFile(t, ctx, s.pool, "485_issue_triage_state_validate.up.sql")+ applyMigrationFile(t, ctx, s.pool, "489_issue_triage_state_validate.up.sql")if !s.triageStateValidated(t, ctx) {- t.Error("485 left the CHECK NOT VALID")+ t.Error("489 left the CHECK NOT VALID")}- s.assertTriageStateEnforced(t, ctx, "485")+ s.assertTriageStateEnforced(t, ctx, "489")// Rolling back the validation cannot restore a validated constraint, so it// has to leave the state 483 produced rather than no constraint at all.- applyMigrationFile(t, ctx, s.pool, "485_issue_triage_state_validate.down.sql")+ applyMigrationFile(t, ctx, s.pool, "489_issue_triage_state_validate.down.sql")if s.triageStateValidated(t, ctx) {- t.Error("485 down left the CHECK validated")+ t.Error("489 down left the CHECK validated")}- s.assertTriageStateEnforced(t, ctx, "485 down")+ s.assertTriageStateEnforced(t, ctx, "489 down")applyMigrationFile(t, ctx, s.pool, "483_issue_triage_state.down.sql")diff --git a/server/migrations/483_issue_triage_state.up.sql b/server/migrations/483_issue_triage_state.up.sqlindex c9c768321e..17bd16d8a3 100644--- a/server/migrations/483_issue_triage_state.up.sql+++ b/server/migrations/483_issue_triage_state.up.sql@@ -19,7 +19,7 @@-- while holding the ALTER's ACCESS EXCLUSIVE lock, which stops all issue reads-- and writes for the length of that scan even though the new column needs no-- backfill. NOT VALID enforces the constraint on every write from this point--- on and skips the scan; migration 485 validates the rows already on disk under+-- on and skips the scan; migration 489 validates the rows already on disk under-- SHARE UPDATE EXCLUSIVE, which readers and writers run straight through.---- The runner sends this file as one implicit transaction. Bound lockdiff --git a/server/migrations/485_issue_triage_state_validate.down.sql b/server/migrations/489_issue_triage_state_validate.down.sqlsimilarity index 100%rename from server/migrations/485_issue_triage_state_validate.down.sqlrename to server/migrations/489_issue_triage_state_validate.down.sqldiff --git a/server/migrations/485_issue_triage_state_validate.up.sql b/server/migrations/489_issue_triage_state_validate.up.sqlsimilarity index 100%rename from server/migrations/485_issue_triage_state_validate.up.sqlrename to server/migrations/489_issue_triage_state_validate.up.sql