Repository navigation
Move the empty-string checks migration after the last one hosted applied - #167
Merged
Merged
Conversation
#152's migration was timestamped 20260912133715 but merged after #154's 20260914080000 had already reached the hosted project, so supabase db push refuses it as out of order and the deploy fails before building. Renaming it to a later timestamp lets the push apply it normally, and keeps local replay order the same as hosted order. Hosted never applied the old name, so nothing there records it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every
Vercel Deployrun since #152 merged has failed at the migration step:#152's migration is timestamped
20260912133715, but it merged after #154's20260914080000had already been applied to the hosted project.db pushwill not insert a migration before the last one the remote has applied, so production is stuck at the commit before #152.What
Renames the file to
20261007100000_add_empty_string_checks.sql. The contents are unchanged. Hosted never applied the old name, so itsschema_migrationshas no entry to reconcile.I chose a rename over adding
--include-allto the deploy step. AGENTS.md treats that flag as a deliberate repair, and leaving it on would also let a future out-of-order migration through without anyone noticing. The rename also keeps local replay order the same as the order hosted applied the migrations in.Checked
pnpm db:resetapplies every migration in the new order without errors.pnpm test:db: 18 files and 271 tests passed, exit 0.Not checked: whether any hosted row already has a blank
practitioners.nameorpractitioner_contacts.contact_email. If one does, the constraint will fail to add and the push will fail again, for a different reason.