Repository navigation
migrations: one runner the deploy calls; server refuses to start with pending migrations - #2997
Merged
Merged
Conversation
…with pending migrations A small Rust runner (queue-rs/polis-migrate) applies pending numbered migrations in order, each atomically, recording them in one public.migrations table (the 2021 runner's idea). A one-time reconcile adopts migrations already present on an existing database after checking the catalog. The server checks at startup and refuses to run while any migration is pending. Proven on local Postgres: fresh; production-shaped through 000022 (adopt, then apply 19/23/24); re-run; failing migration; two runners at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
… starts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
… only 19/23/24 Records production's existing schema as the legacy contract (named variants kept as they are), treats the old cleanup migrations 4, 5 and 7 as already applied, and limits the forward path to the job-system tables (19, 23, 24). Adds the migration-to-release table and upgrade notes for every deployment. No numbered SQL file changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
…ion; one shared check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s
Delphi Coverage Report
|
This was referenced Oct 10, 2026
colinmegill
added a commit
that referenced
this pull request
Oct 10, 2026
…back out (#3000) * deploys: safe ordering and a health check; take the migration runner back out Deploys now prepare the new version while the old one serves, check the server is healthy after the swap, and fail visibly (leaving the remaining boxes on the old version) if it is not. The migration runner from #2997 is removed from edge until it returns with the one-time reconcile in the deploy sequence. No database change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s * deploy hook tests: run the same way in CI and on the work boxes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s --------- Co-authored-by: Claude Opus 5.5 <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.
Observable changes:
Why: deployments missing a migration has been a recurring source of bugs; the 2021 runner had the right shape and was lost when the Clojure stack retired. Mapped in the private notes before building.
Proof (local Postgres on the work boxes): fresh database applies all; production-shaped schema through 000022 adopts then applies 000019/000023/000024; re-run applies nothing; a failing migration stops with nothing half-applied and the server refuses to start; two runners at once — one applies, one waits. cargo tests 4/4, proof suite 14/14.
🤖 Generated with Claude Code
https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s