From 2e0b820637a60561a03d51ae5e6fee89203577f7 Mon Sep 17 00:00:00 2001 From: Adrian Hesketh Date: Fri, 2 Nov 2018 15:41:41 +0000 Subject: [PATCH 1/2] Include details about migration locking in the FAQ --- FAQ.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index f8bb9a8..efb604e 100644 --- a/FAQ.md +++ b/FAQ.md @@ -64,4 +64,7 @@ which prevents attempts to run more migrations on top of a failed migration. You need to manually fix the error and then "force" the expected version. - +#### What happens if two programs try and update the database at the same time? + Database-specific locking features are used by each migration driver to prevent multiple processes from attempting to migrate + the same database at the same time. For example, the MySQL driver uses the `GET_LOCK` function, while the Postgres driver uses + the `pg_advisory_lock` function. From 6f1479fa41ad02bb51c4a94524b9cc6eaf5625ac Mon Sep 17 00:00:00 2001 From: Dale Hui Date: Fri, 14 Dec 2018 16:28:04 +0000 Subject: [PATCH 2/2] Update FAQ.md Co-Authored-By: a-h --- FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index efb604e..1142f59 100644 --- a/FAQ.md +++ b/FAQ.md @@ -65,6 +65,6 @@ and then "force" the expected version. #### What happens if two programs try and update the database at the same time? - Database-specific locking features are used by each migration driver to prevent multiple processes from attempting to migrate +Database-specific locking features are used by *some* database drivers to prevent multiple instances of migrate from running migrations at the same time the same database at the same time. For example, the MySQL driver uses the `GET_LOCK` function, while the Postgres driver uses the `pg_advisory_lock` function.