Skip to content

fix(database): make the migration runner work with drizzle-orm 1.0.0-rc - #1788

Merged
viethung0o0 merged 1 commit into
mainfrom
fix/migration-runner-drizzle-rc
Nov 26, 2026
Merged

viethung0o0 merged 1 commit into
mainfrom
fix/migration-runner-drizzle-rc

Conversation

@viethung0o0

Copy link
Copy Markdown
Contributor

Summary

  • The deploy migration step crashed on start after the drizzle-orm 1.0.0-rc upgrade (chore(database): upgrade drizzle-orm and drizzle-kit to 1.0.0-rc.5 #1759), so no migration could be applied.
  • run-migrations.mjs now uses the rc migration API to upgrade and read the migrations table.
  • A new test checks that every import of the script exists in the installed packages, so the next drizzle upgrade fails in CI instead of at deploy.

Test plan

  • Lint, type-check and the new test pass
  • Runner built like the Docker image applies all migrations on a fresh database
  • Runner applies only the pending migrations on a database that already has a migrations table, and is a no-op when re-run
  • Deploy migration step passes on the rebuilt image

@github-actions github-actions Bot added the bug Something isn't working as expected label Nov 26, 2026
@viethung0o0
viethung0o0 marked this pull request as ready for review November 26, 2026 09:08
@viethung0o0
viethung0o0 merged commit 29e848d into main Nov 26, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants