db-migrate 1.0.0-beta.26 → 1.0.0-beta.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,7 +73,7 @@ const execUnit = {
73
73
  chain.addChain(AddConventions);
74
74
  }
75
75
  chain.addChain(Learn);
76
- // chain.addChain(StateTravel);
76
+ chain.addChain(StateTravel);
77
77
 
78
78
  await State.startMigration(context._driver, file, context.internals);
79
79
  // startMigration - needs secondary instance since we can not afford to
@@ -99,7 +99,6 @@ const execUnit = {
99
99
  await execUnit.down(context, driver, file);
100
100
  throw err;
101
101
  }
102
- await Promise.promisify(context.writeMigrationRecord.bind(context))(file);
103
102
  await State.endMigration(context._driver, file, context.internals);
104
103
  log.verbose(`[fix] current schema`, util.inspect(context.internals.schema, false, null, true));
105
104
  // end migration, same as start migration
package/lib/state.js CHANGED
@@ -47,6 +47,7 @@ module.exports = {
47
47
 
48
48
  log.info(`[state] Created a backup of ${internals.migrationState} by renaming table to ${newName}`);
49
49
  await driver._createKV(internals.migrationState);
50
+ await driver._insertKV(internals.migrationState, SSTATE, '{}');
50
51
  }
51
52
  }
52
53
 
package/lib/walker.js CHANGED
@@ -64,7 +64,7 @@ Walker.prototype = {
64
64
  return this._driver._createList(this.internals.migrationTable);
65
65
  },
66
66
 
67
- createMigrationsTable: function (options) {
67
+ createMigrationsTable: function (options = {}) {
68
68
  if (
69
69
  typeof this._driver._createList !== 'function' ||
70
70
  typeof this._driver._getList !== 'function' ||
package/package.json CHANGED
@@ -31,7 +31,7 @@
31
31
  "programable",
32
32
  "api"
33
33
  ],
34
- "version": "1.0.0-beta.26",
34
+ "version": "1.0.0-beta.27",
35
35
  "engines": {
36
36
  "node": ">=8.0.0"
37
37
  },