Skip to content

Commit 4c3e650

Browse files
committed
fix default var and actually write the state
Signed-off-by: Tobias Gurtzick <[email protected]>
1 parent 0894ebe commit 4c3e650

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/executors/versioned/v2.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const execUnit = {
7373
chain.addChain(AddConventions);
7474
}
7575
chain.addChain(Learn);
76-
// chain.addChain(StateTravel);
76+
chain.addChain(StateTravel);
7777

7878
await State.startMigration(context._driver, file, context.internals);
7979
// startMigration - needs secondary instance since we can not afford to
@@ -99,7 +99,6 @@ const execUnit = {
9999
await execUnit.down(context, driver, file);
100100
throw err;
101101
}
102-
await Promise.promisify(context.writeMigrationRecord.bind(context))(file);
103102
await State.endMigration(context._driver, file, context.internals);
104103
log.verbose(`[fix] current schema`, util.inspect(context.internals.schema, false, null, true));
105104
// end migration, same as start migration

lib/state.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ module.exports = {
4747

4848
log.info(`[state] Created a backup of ${internals.migrationState} by renaming table to ${newName}`);
4949
await driver._createKV(internals.migrationState);
50+
await driver._insertKV(internals.migrationState, SSTATE, '{}');
5051
}
5152
}
5253

lib/walker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Walker.prototype = {
6464
return this._driver._createList(this.internals.migrationTable);
6565
},
6666

67-
createMigrationsTable: function (options) {
67+
createMigrationsTable: function (options = {}) {
6868
if (
6969
typeof this._driver._createList !== 'function' ||
7070
typeof this._driver._getList !== 'function' ||

0 commit comments

Comments
 (0)