mirror of
https://github.com/knex/knex.git
synced 2026-01-07 20:47:11 +00:00
Merge branch 'elhigu-fixed-regression-running-migrations-through-cli'
This commit is contained in:
commit
ef462f0f2a
@ -196,7 +196,7 @@ export default class Migrator {
|
||||
.then(batchNo => {
|
||||
return this._waterfallBatch(batchNo, migrations, direction)
|
||||
})
|
||||
.then(() => this._freeLock())
|
||||
.tap(() => this._freeLock())
|
||||
.catch(error => {
|
||||
var cleanupReady = Promise.resolve();
|
||||
|
||||
|
||||
@ -243,7 +243,10 @@ module.exports = function(knex) {
|
||||
|
||||
describe('knex.migrate.rollback', function() {
|
||||
it('should delete the most recent batch from the migration log', function() {
|
||||
return knex.migrate.rollback({directory: 'test/integration/migrate/test'}).then(function() {
|
||||
return knex.migrate.rollback({directory: 'test/integration/migrate/test'}).spread(function(batchNo, log) {
|
||||
expect(batchNo).to.equal(1);
|
||||
expect(log).to.have.length(2);
|
||||
expect(log[0]).to.contain('test/integration/migrate/test');
|
||||
return knex('knex_migrations').select('*').then(function(data) {
|
||||
expect(data.length).to.equal(0);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user