Skip to content

Commit

Permalink
fix default var and actually write the state
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Gurtzick <[email protected]>
  • Loading branch information
wzrdtales committed Sep 7, 2023
1 parent 0894ebe commit 4c3e650
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/executors/versioned/v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const execUnit = {
chain.addChain(AddConventions);
}
chain.addChain(Learn);
// chain.addChain(StateTravel);
chain.addChain(StateTravel);

await State.startMigration(context._driver, file, context.internals);
// startMigration - needs secondary instance since we can not afford to
Expand All @@ -99,7 +99,6 @@ const execUnit = {
await execUnit.down(context, driver, file);
throw err;
}
await Promise.promisify(context.writeMigrationRecord.bind(context))(file);
await State.endMigration(context._driver, file, context.internals);
log.verbose(`[fix] current schema`, util.inspect(context.internals.schema, false, null, true));
// end migration, same as start migration
Expand Down
1 change: 1 addition & 0 deletions lib/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module.exports = {

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

Expand Down
2 changes: 1 addition & 1 deletion lib/walker.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Walker.prototype = {
return this._driver._createList(this.internals.migrationTable);
},

createMigrationsTable: function (options) {
createMigrationsTable: function (options = {}) {
if (
typeof this._driver._createList !== 'function' ||
typeof this._driver._getList !== 'function' ||
Expand Down

0 comments on commit 4c3e650

Please sign in to comment.