@contember/database-migrations
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -69,6 +69,3 @@ "use strict"; | ||
const lock = async (db) => { | ||
const [result] = await db.select(`select pg_try_advisory_lock(${PG_MIGRATE_LOCK_ID}) as "lockObtained"`); | ||
if (!result.lockObtained) { | ||
throw new Error('Another migration is already running'); | ||
} | ||
await db.select(`select pg_advisory_lock(${PG_MIGRATE_LOCK_ID})`); | ||
}; | ||
@@ -75,0 +72,0 @@ const unlock = async (db) => { |
{ | ||
"name": "@contember/database-migrations", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"license": "Apache-2.0", | ||
@@ -8,3 +8,3 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"@contember/database": "^0.8.0", | ||
"@contember/database": "^0.8.1", | ||
"node-pg-migrate": "^4.8.0" | ||
@@ -19,3 +19,3 @@ }, | ||
}, | ||
"gitHead": "b066c9e32d10ad436d0cfada0d9bd9ad3e2e7e5f" | ||
"gitHead": "53817a2fea724a43b3ac5b5184df4e9af41ef3ac" | ||
} |
@@ -91,6 +91,3 @@ /* | ||
const lock = async (db: DBConnection): Promise<void> => { | ||
const [result] = await db.select(`select pg_try_advisory_lock(${PG_MIGRATE_LOCK_ID}) as "lockObtained"`) | ||
if (!result.lockObtained) { | ||
throw new Error('Another migration is already running') | ||
} | ||
await db.select(`select pg_advisory_lock(${PG_MIGRATE_LOCK_ID})`) | ||
} | ||
@@ -97,0 +94,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
265990
632
Updated@contember/database@^0.8.1