Skip to content

Consolidate 12 migrations into a single baseline schema - #6

Merged
NitinKumar004 merged 2 commits into
mainfrom
chore/single-migration
Aug 9, 2026
Merged

Consolidate 12 migrations into a single baseline schema#6
NitinKumar004 merged 2 commits into
mainfrom
chore/single-migration

Conversation

@NitinKumar004

Copy link
Copy Markdown
Contributor

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

  • Deleted 001_create_tasks.go012_one_active_run.go.
  • Added 001_schema.go — creates all six tables with their final columns,
    every index, and the runs_one_active_per_task partial unique index, in
    foreign-key dependency order (connections → tasks → runs → children).
  • all.go now returns a single migration.

Verified

  • Fresh control DB migrates in one step; all 6 tables, 16 task columns, and
    the active-run index are present and identical to before.
  • Full 1M-row adaptive backfill succeeds end to end; duplicate-run guard still
    holds; complete unit + integration suite (Postgres + MySQL + Redis) green.

No behavior change — same final schema, one file.

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.
@NitinKumar004
NitinKumar004 merged commit 8a23cf5 into main Aug 9, 2026
3 checks passed
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