Skip to content

Commit 9752e77

Browse files
committed
fix(migrations): renumber purchase_history_revocation 000060 -> 000064
Base feat/multicloud-web-frontend now carries 000059_seed_purchaser_group (merged via PR #941) and 000063_purchase_history_monthly_cost_nullable, so the revocation migration must move above the highest base migration to keep the sequence monotonic and avoid collisions on the merge ref. Move both the up and down files to 000064 and update the in-code reference comment in store_postgres.queryPurchaseHistory.
1 parent cb22b93 commit 9752e77

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 000060. Queries must
1543+
// The revocation columns were added in migration 000064. 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/000060_purchase_history_revocation.down.sql renamed to internal/database/postgres/migrations/000064_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 000060: remove revocation columns from purchase_history
1+
-- Rollback 000064: 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/000060_purchase_history_revocation.up.sql renamed to internal/database/postgres/migrations/000064_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 000060: add revocation columns to purchase_history
1+
-- Migration 000064: 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)