Comparing version 0.95.14 to 0.95.15
@@ -330,3 +330,3 @@ // Migrator | ||
.then((rowCount) => { | ||
if (rowCount != 1) { | ||
if (rowCount !== 1) { | ||
throw new Error('Migration table is already locked'); | ||
@@ -333,0 +333,0 @@ } |
@@ -58,7 +58,8 @@ const { | ||
return trxOrKnex | ||
.from(trxOrKnex.raw('?? (??)', [lockTableWithSchema, 'is_locked'])) | ||
.insert(function () { | ||
return this.select(trxOrKnex.raw('?', [0])).whereNotExists(function () { | ||
return this.select('*').from(lockTableWithSchema); | ||
}); | ||
.select('*') | ||
.from(lockTableWithSchema) | ||
.then((data) => { | ||
return !data.length | ||
? trxOrKnex.from(lockTableWithSchema).insert({ is_locked: 0 }) | ||
: null; | ||
}); | ||
@@ -65,0 +66,0 @@ } |
{ | ||
"name": "knex", | ||
"version": "0.95.14", | ||
"version": "0.95.15", | ||
"description": "A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3", | ||
@@ -5,0 +5,0 @@ "main": "knex", |
Sorry, the diff of this file is too big to display
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
770072
20334