Skip to content

feat(db)!: collapse every package migration ledger to one initial migration (CL-8315) - #821

Merged
TheGreatAxios merged 1 commit into
mainfrom
migrations-reset
Sep 17, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
migrations-reset

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Owner ruling: breaking cutover, no history preserved, no drop migrations for removed tables.
  • agent-directory and inbox each netted zero tables (definition_skills and snooze were created then dropped): their migration modules, applyXMigrations exports, and scripts/db-setup.ts entries are removed outright, and their test/migrations.test.ts files deleted.
  • cron and evals already shipped exactly one migration; left unchanged.
  • notify and webhook-triggers collapse their multi-step ALTER history into a single 0001 migration each, creating the current tables with their tenant/principal foreign keys and indexes already in place.
  • packages/migration-runner untouched.

Verification

  • bun run typecheck, bun run lint, bun run fmt all pass.
  • Ran bun scripts/db-setup.ts against a scratch Postgres 17 database (docker): creates the database, applies platform migrations, then applies webhook-triggers/notify/mailbox/cron migrations cleanly with the collapsed single-migration files.
  • Ran bun test for the touched packages against that database: notify and webhook-triggers' own migration tests pass. Some unrelated pre-existing DB-gated tests fail in this environment for reasons independent of this change (a stale public.tenant-less scratch database convention for repo-review-lease.drizzle.test.ts, and a _e2e_e2e scratch-database-name collision from the DATABASE_URL this sandbox happened to use) — confirmed by inspecting origin/main's same test files, which already carried the same tenant/principal FK dependency before this change.

Test plan

  • bun run typecheck
  • bun run lint
  • bun run fmt
  • bun scratch scripts/db-setup.ts against a fresh Postgres 17 database
  • bun test packages/{notify,webhook-triggers,cron,agent-directory,inbox}/test against that database

…ration

Owner ruling: this is a breaking cutover. agent-directory and inbox each
netted zero tables (definition_skills and snooze were created then
dropped), so their migration ledgers, exports, and db-setup entries are
removed outright. cron and evals already shipped a single migration.
notify and webhook-triggers collapse their multi-step ALTER history into
one 0001 migration each, with the tenant/principal foreign keys and
indexes already in place.
@TheGreatAxios
TheGreatAxios merged commit 9d025f1 into main Sep 17, 2026
@TheGreatAxios TheGreatAxios changed the title feat(db)!: collapse every package migration ledger to one initial migration feat(db)!: collapse every package migration ledger to one initial migration (CL-8315) Sep 17, 2026
@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

CL-8315

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