Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate: Refactor _lockMigrations to avoid forUpdate
Since _isLocked is only called just before _lockMigrations, it is redundant and we can accomplish the same thing by checking the rowCount returned by the update (verified by testing with postgres, mysql, sqlite, and mssql). The benefit of this change is improving compatbility with CockroachDB, which does not support FOR UPDATE. Updates knex#2002
- Loading branch information