Repository navigation
fix(hub): apply the approval rounds migration on every database - #181
Merged
TheGreatAxios merged 1 commit intoNov 4, 2026
Merged
TheGreatAxios merged 1 commit into
TheGreatAxios merged 1 commit into
Conversation
0037's journal timestamp sorts before 0036's, so the migrator skipped it on databases already past 0036. 0038 reapplies it idempotently, and a test keeps journal timestamps increasing.
TheGreatAxios
marked this pull request as ready for review
November 4, 2026 23:09
TheGreatAxios
enabled auto-merge
November 4, 2026 23:09
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.
Migration 0037 has a journal timestamp earlier than 0036's, so the migrator skipped it on any database already migrated past 0036. This adds migration 0038, generated with db:generate --custom and given a timestamp after every existing entry, which recreates the approval rounds table, its foreign keys and its index only where they are missing. 0037 is unchanged. A new test checks that journal timestamps increase, with 0037 as the one known exception.
Verified against a throwaway Postgres 17.11 with three databases. A fresh database migrated fully has the table, three foreign keys and the index. A database rolled back to 0036 still lacked the table after migrating with the old journal, and had it after migrating with this change. A fully migrated database migrated again succeeded with no error. The table definition was identical in all three. Lint, format check, typecheck, tests, pins:verify and vendor:verify pass.
Closes CL-12140