Skip to content

Commit d7a65fa

Browse files
committed
fix(db): renumber duplicate migration 000058_seed_purchaser_group to 000059 (base collision from #803+#924)
The base feat/multicloud-web-frontend merged two 000058 migrations from the recent wave, which the check-migration-conflicts pre-commit hook rejects: - 000058_purchase_executions_direct_execute_audit (#803, schema change) - 000058_seed_purchaser_group (#924, data seed) Keep the schema-change audit migration at 000058 and renumber the seed migration to the next free slot, 000059 (base jumps 000058 -> 000063, so 000059-000062 are open). golang-migrate discovers migrations by filename glob, so no embed list needs updating; only two self-references were adjusted: - auth/types.go GroupPurchaser doc comment pointing at the filename - the self-referencing error message inside the up.sql Safe to renumber without applied-state reconciliation: the base has not compiled since the #803/#907 break, so neither 000058 migration has been applied to any database yet.
1 parent 501f30d commit d7a65fa

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎internal/auth/types.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ const DefaultPurchaserGroupID = "00000000-0000-5000-8000-000000000005"
317317

318318
// GroupPurchaser is the canonical name of the system-managed Purchaser
319319
// group. MUST match the literal name inserted by migration
320-
// 000058_seed_purchaser_group.up.sql so name-based lookups agree with
320+
// 000059_seed_purchaser_group.up.sql so name-based lookups agree with
321321
// the seeded row.
322322
const GroupPurchaser = "Purchaser"
323323

internal/database/postgres/migrations/000058_seed_purchaser_group.down.sql renamed to internal/database/postgres/migrations/000059_seed_purchaser_group.down.sql

File renamed without changes.

internal/database/postgres/migrations/000058_seed_purchaser_group.up.sql renamed to internal/database/postgres/migrations/000059_seed_purchaser_group.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ BEGIN
3535
AND id <> '00000000-0000-5000-8000-000000000005'
3636
) THEN
3737
RAISE EXCEPTION
38-
'migration 000058: a group named ''Purchaser'' already exists with a different id; rename it before applying this migration so the seeded id (00000000-0000-5000-8000-000000000005) can be created';
38+
'migration 000059: a group named ''Purchaser'' already exists with a different id; rename it before applying this migration so the seeded id (00000000-0000-5000-8000-000000000005) can be created';
3939
END IF;
4040
END $$;
4141

0 commit comments

Comments
 (0)