Hey folks, perhaps a silly question but if I run `...
# orm-help
t
Hey folks, perhaps a silly question but if I run
prisma migrate deploy
as one of the first commands during a load balanced deployment (Say AWS ECS with multiple servers) will the multiple servers stomp on each other when deploying to the same database? In the past I think a Java dev mentioned Flywheel is able to manage migrations on LoadBalanced fleets, so I'm curious if I need a separate pipeline step to deploy migrations before updating servers, or will the first server to come up manage the migration and the other servers will wait for it to complete? Thanks!
✅ 2
n
Hey Trevor 👋 Welcome to our community! Prisma Migrate makes use of advisory locking when you run production commands like
prisma migrate deploy
This safeguard ensures that multiple commands cannot run at the same time - for example, if you merge two pull requests in quick succession. Advisory locking has a 10 second timeout (not configurable), and uses the default advisory locking mechanism available in the underlying provider.
t
Fantastic, so to be super clear
prisma migrate deploy
and it's run at the same time by 3 servers, assuming nothing weird like a 10 second delay, then only one server will apply the migration? (Also thanks for responding!)
n
That’s correct 👍