fix(migrations): rename PMS-4 recovery-codes migration 027 -> 029 (version collision with PMS-106) #84
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-server!84
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/migration-027-collision"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PMS-4 (PR #83) and PMS-106 (PR #80) were developed in parallel and both claimed migration version 27 (027_user_mfa_recovery_codes.sql and 027_sla_notify.sql). PMS-106 merged first; my PMS-4 PR merged on top because the two files do not conflict at the git layer, but sqlx now errors on every fresh DB with:
duplicate key value violates unique constraint "_sqlx_migrations_pkey"
Key (version)=(27) already exists.
Renumber the recovery-codes migration to 029 (next free slot after PMS-58's 028_appointment_reminders.sql). Also add IF NOT EXISTS to the ALTER TABLE so any environment that already applied the old 027 form picks up the renamed file without erroring on the duplicate column.
Verified: cargo test --test auth -> 10/10 green; whole-crate cargo test -> all green (152+ tests across all binaries).