Skip to content

Commit d60791b

Browse files
committed
fix(migrations): renumber purchase_history_revocation 000057 -> 000059
Three PRs were dispatched in parallel and each independently picked the same "next free" migration number 000057. PR #802 (universal-plans cleanup) took 000057, PR #803 (execute-permissions) renumbered to 000058 in a follow-up, and this PR (#804, revocation) now takes 000059. - 000057_purchase_history_revocation.up.sql -> 000059_* - 000057_purchase_history_revocation.down.sql -> 000059_* - internal/config/store_postgres.go: comment ref "migration 000057" -> "migration 000059" - migration file headers updated Verified 000059 is free on origin/feat/multicloud-web-frontend and no other open PR introduces a clashing migration. Per `project_migration_number_collisions.md`.
1 parent 85d07a9 commit d60791b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎internal/config/store_postgres.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,7 @@ func (s *PostgresStore) GetPurchaseHistoryFiltered(
15401540
// estimated_savings, plan_id, plan_name, ramp_step, cloud_account_id,
15411541
// revocation_window_closes_at, revoked_at, revoked_via, support_case_id
15421542
//
1543-
// The revocation columns were added in migration 000057. Queries must
1543+
// The revocation columns were added in migration 000059. Queries must
15441544
// include them explicitly so the Scan targets stay in sync.
15451545
func (s *PostgresStore) queryPurchaseHistory(ctx context.Context, query string, args ...any) ([]PurchaseHistoryRecord, error) {
15461546
rows, err := s.db.Query(ctx, query, args...)

internal/database/postgres/migrations/000057_purchase_history_revocation.down.sql renamed to internal/database/postgres/migrations/000059_purchase_history_revocation.down.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- Rollback 000057: remove revocation columns from purchase_history
1+
-- Rollback 000059: remove revocation columns from purchase_history
22
DROP INDEX IF EXISTS idx_purchase_history_revocation_window;
33

44
ALTER TABLE purchase_history

internal/database/postgres/migrations/000057_purchase_history_revocation.up.sql renamed to internal/database/postgres/migrations/000059_purchase_history_revocation.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- Migration 000057: add revocation columns to purchase_history
1+
-- Migration 000059: add revocation columns to purchase_history
22
--
33
-- AWS EC2 RIs: no direct cancel API; the 24h free-cancel window requires an
44
-- AWS Support case (support:CreateCase). AWS support-case revocation is

0 commit comments

Comments
 (0)