Repository navigation
feat(migrations)!: ship migrations as SQL with Interchange's signature - #8
Merged
Conversation
TheGreatAxios
commented
Sep 25, 2026
TheGreatAxios
left a comment
Contributor
Author
There was a problem hiding this comment.
Self-review: diff matches the linked ticket(s); independent review passes addressed (fixed or waived as noted in the description); typecheck, build and the Postgres-backed suite pass on this branch.
TheGreatAxios
force-pushed
the
cl-9218-agent-token-align-migrations-to-runmigrationsconfig-schema
branch
from
September 25, 2026 18:09
d2da582 to
dcd4a1c
Compare
TheGreatAxios
force-pushed
the
cl-9218-agent-token-align-migrations-to-runmigrationsconfig-schema
branch
2 times, most recently
from
September 25, 2026 23:49
5063ff2 to
aedff2d
Compare
TheGreatAxios
force-pushed
the
cl-9218-agent-token-align-migrations-to-runmigrationsconfig-schema
branch
from
September 25, 2026 23:53
aedff2d to
8e34bdf
Compare
TheGreatAxios
force-pushed
the
cl-9218-agent-token-align-migrations-to-runmigrationsconfig-schema
branch
from
September 26, 2026 01:27
8e34bdf to
4fc3398
Compare
TheGreatAxios
force-pushed
the
cl-9218-agent-token-align-migrations-to-runmigrationsconfig-schema
branch
from
September 26, 2026 01:37
4fc3398 to
4ce4318
Compare
Hosts call runAgentTokenMigrations(config, { schema }) with the same
config and schema they pass Interchange's runMigrations.
TheGreatAxios
force-pushed
the
cl-9218-agent-token-align-migrations-to-runmigrationsconfig-schema
branch
from
September 27, 2026 01:00
4ce4318 to
273dc04
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
migrations/0001_agent_token.sql(drizzle breakpoint format) and ships in the tarball.runAgentTokenMigrations(dbConfig, { schema })replacesapplyAgentTokenMigrations(databaseUrl, { tenantSchema }).schemais the host schema holding Interchange's tenant table (the value passed torunMigrations); tables stay inagent_tokenwith the FK rewritten to<schema>.tenant. An empty schema or missing SQL throws, as in Interchange.DBConfigvalidation:@intx/db0.4.0 exportsDBConfigas a type only.apps/hub/src/migrate.ts, which callsapplyAgentTokenMigrations.Verification
bun install --frozen-lockfile,bun run typecheck,bun run build: passDATABASE_URL=... bun test --timeout 60000 ./src): 7 pass, 0 failnpm pack --dry-runlists the SQL; the builtdist/migrations.jsmigrates under plain Node.Closes CL-9218