-
-
Notifications
You must be signed in to change notification settings - Fork 973
Open
Labels
bugSomething isn't workingSomething isn't workingdrizzle/kitpriorityWill be worked on nextWill be worked on next
Description
What version of drizzle-orm
are you using?
0.27.0
What version of drizzle-kit
are you using?
0.19.3
Describe the Bug
There's no protection against the migrate
function being executed simultaneously multiple times.
Executing await Promise.all([migrate(), migrate(), migrate()])
will lead to the migrations running three times and potentially causing problems.
Expected behavior
The migrate
function should be designed to execute only once at any given time, probably by using a locking mechanism.
For reference, Prisma uses Advisory Locking.
Environment & setup
Postgres 15.3
reecefenwick, tcurdt, jmankopf, mauricedoepke, alexis-aquanty and 8 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdrizzle/kitpriorityWill be worked on nextWill be worked on next