Repository navigation
feat(db)!: collapse every package migration ledger to one initial migration (CL-8315) - #821
Merged
Merged
Conversation
…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
force-pushed
the
migrations-reset
branch
from
September 17, 2026 23:36
2231bec to
13ba926
Compare
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.
Summary
agent-directoryandinboxeach netted zero tables (definition_skillsandsnoozewere created then dropped): their migration modules,applyXMigrationsexports, andscripts/db-setup.tsentries are removed outright, and theirtest/migrations.test.tsfiles deleted.cronandevalsalready shipped exactly one migration; left unchanged.notifyandwebhook-triggerscollapse their multi-step ALTER history into a single0001migration each, creating the current tables with their tenant/principal foreign keys and indexes already in place.packages/migration-runneruntouched.Verification
bun run typecheck,bun run lint,bun run fmtall pass.bun scripts/db-setup.tsagainst 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.bun testfor 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 stalepublic.tenant-less scratch database convention forrepo-review-lease.drizzle.test.ts, and a_e2e_e2escratch-database-name collision from theDATABASE_URLthis sandbox happened to use) — confirmed by inspectingorigin/main's same test files, which already carried the same tenant/principal FK dependency before this change.Test plan
bun run typecheckbun run lintbun run fmtbun scratch scripts/db-setup.tsagainst a fresh Postgres 17 databasebun test packages/{notify,webhook-triggers,cron,agent-directory,inbox}/testagainst that database