Consolidate 12 migrations into a single baseline schema - #6
Merged
Conversation
The repo has never shipped, so the incremental migration history has no value. Collapse migrations 1-12 into a single schema() that creates the final table shapes (all columns, indexes, and the one-active-run partial unique index) in foreign-key dependency order. Future changes add numbered migrations after it.
seed-target.sql is a dev/demo fixture (1M-row fake customer DB), not a deployment artifact. Move it under deploy/sandbox/, update the compose mount path, and note it in the header + README.
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.
Consolidate migrations into one baseline schema
Since the repo has never shipped, the 12 incremental migrations (built up
during development) carry no history worth keeping. This collapses them into a
single
schema()migration that creates the final schema directly.What changed
001_create_tasks.go…012_one_active_run.go.001_schema.go— creates all six tables with their final columns,every index, and the
runs_one_active_per_taskpartial unique index, inforeign-key dependency order (connections → tasks → runs → children).
all.gonow returns a single migration.Verified
the active-run index are present and identical to before.
holds; complete unit + integration suite (Postgres + MySQL + Redis) green.
No behavior change — same final schema, one file.