Skip to content

Run PG migrations in separate transactions#5199

Open
brendanlong wants to merge 1 commit into
drizzle-team:mainfrom
brendanlong:main
Open

Run PG migrations in separate transactions#5199
brendanlong wants to merge 1 commit into
drizzle-team:mainfrom
brendanlong:main

Conversation

@brendanlong

Copy link
Copy Markdown

Some migrations have to happen in different transactions, like adding enums and then using them.

This makes every migration run in its own transaction, allowing them each to be atomic.

Fixes #3249
Fixes #3466

Some migrations have to happen in different transactions, like adding enums and then
using them.

This makes every migration run in its own transaction, allowing them each to be
atomic.

Fixes drizzle-team#3249
Fixes drizzle-team#3466
@cescox

cescox commented Jan 21, 2026

Copy link
Copy Markdown

We hit this exact issue (schema created in migration N not visible to migration N+1) and confirmed the fix works

@MadDeveloper

Copy link
Copy Markdown

We’re currently experiencing the exact same issue, which is quite annoying.

@piazzatron

Copy link
Copy Markdown

Would be great if this could get merged. Using enums with postgres + drizzle migrations is a big pain until this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants