Skip to content

build: refuse a bump that would strand schema work in a released migration - #121

Merged
amitdugar merged 1 commit into
masterfrom
build-refuse-a-bump-that-would-strand-schema-work-in-a-released-migration
Aug 18, 2026
Merged

build: refuse a bump that would strand schema work in a released migration#121
amitdugar merged 1 commit into
masterfrom
build-refuse-a-bump-that-would-strand-schema-work-in-a-released-migration

Conversation

@amitdugar

Copy link
Copy Markdown
Member

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.

…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
amitdugar merged commit c1047f0 into master Aug 18, 2026
7 of 8 checks passed
@amitdugar
amitdugar deleted the build-refuse-a-bump-that-would-strand-schema-work-in-a-released-migration branch August 18, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant