Skip to content

Docs: Migrate advisory locking mechanism #5843

@Jolg42

Description

@Jolg42

Migrate has an advisory locking mechanism since 2.17 implemented by @tomhoule

see prisma/prisma-engines#1118

Why a locking in Migrate?
Because migrations should not be running concurrently on the same database.

I think it would be great to document this and have an answer for

  • What happens if two migrate deploy command run simultaneously? One gets the lock and the other fails?
  • Does it uses timeouts? Is it configurable?

It's an important detail to know for deployments I think.

Tom would be the best person to write about how it works.

When we have the details we can open an issue for the docs here

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions