build: refuse a bump that would strand schema work in a released migration - #121
Merged
amitdugar merged 1 commit intoAug 18, 2026
Conversation
…ation After a release the open migration file is named for a version that has already been published, and writing DDL into it is the obvious thing to do -- it is the only open file. But a lab already on that version never replays it, so the change reaches nobody, and the next bump closes the file and leaves an empty stub beside it: two migration files for one change, one of them silently inert. The bump now compares the open file against the release tag and stops if it has grown since, naming the file to move the statements into and the command to restore the released one. It refuses rather than moving them itself. Which statements have already shipped is the author's knowledge, not the script's, and both wrong answers are bad: DDL that reaches no lab, or DDL applied twice. Anything git cannot answer reads as "not released", so the ordinary bump behaves exactly as before.
amitdugar
deleted the
build-refuse-a-bump-that-would-strand-schema-work-in-a-released-migration
branch
August 18, 2026 23:28
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.
After a release the open migration file is named for a version that has already
been published, and writing DDL into it is the obvious thing to do -- it is the
only open file. But a lab already on that version never replays it, so the
change reaches nobody, and the next bump closes the file and leaves an empty
stub beside it: two migration files for one change, one of them silently inert.
The bump now compares the open file against the release tag and stops if it has
grown since, naming the file to move the statements into and the command to
restore the released one.
It refuses rather than moving them itself. Which statements have already shipped
is the author's knowledge, not the script's, and both wrong answers are bad:
DDL that reaches no lab, or DDL applied twice. Anything git cannot answer reads
as "not released", so the ordinary bump behaves exactly as before.