migrations: linearize the chain — io_log chains after rating (no fork)#35
Open
hhuuggoo wants to merge 1 commit into
Open
migrations: linearize the chain — io_log chains after rating (no fork)#35hhuuggoo wants to merge 1 commit into
hhuuggoo wants to merge 1 commit into
Conversation
The three phoebe Alembic migrations had a FORK: rating (c2f1a3b4d5e6) and io_log (c2e1d3f4a5b6) BOTH pinned down_revision = b1f0c2d3e4a5 (billing_event), giving two heads — which Alembic rejects and which violates our linear-history rule. Fix: re-point io_log's down_revision to c2f1a3b4d5e6 (rating), so the chain is a single linear line as-shipped: c1d2e3f4a5b6 (Atlas head) -> billing_event -> rating -> io_log No manual re-pointing at apply time anymore. The README previously documented the fork as a "linearize at copy time" step; updated to reflect the files are now linear by construction. Verified: exactly one head (io_log), zero forks. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
The three phoebe Alembic migrations had a fork:
rating(c2f1a3b4d5e6) andio_log(c2e1d3f4a5b6) both pinneddown_revision = b1f0c2d3e4a5(billing_event) → two heads, which Alembic rejects and which violates our linear-history rule.Fix: re-point
io_log'sdown_revisiontoc2f1a3b4d5e6(rating). The chain is now a single linear line as-shipped — no manual re-pointing at apply time:Verified by graph-walking the three files: exactly one head (
io_log), zero forks.Why now
Surfaced while preparing to apply phoebe's migrations to a live Atlas DB for the Token Factory deploy — the fork would have made
alembic upgrade headambiguous (two heads). The README had documented the linearization as a manual copy-time step that was never baked into the files; this makes the files correct by construction and updates the README to match.Contracts
No schema change — only the
down_revisionpointer onio_logand the README. The migrations' DDL is untouched.