Skip to content

Commit

Permalink
Added email.error_data column migration
Browse files Browse the repository at this point in the history
no issue

- additional migration for the column added since the last 3.1 beta release to allow beta upgrades without rollbacks
- will be a no-op for upgrades from 3.0 as it's covered by `3.1/05-add-emails-table.js`
  • Loading branch information
kevinansfield committed Nov 22, 2019
1 parent 6a057fa commit 65adbf7
Showing 1 changed file with 25 additions and 0 deletions.
@@ -0,0 +1,25 @@
const commands = require('../../../schema').commands;

module.exports.up = commands.createColumnMigration({
table: 'emails',
column: 'error_data',
dbIsInCorrectState(columnExists) {
return columnExists === true;
},
operation: commands.addColumn,
operationVerb: 'Adding'
});

module.exports.down = commands.createColumnMigration({
table: 'emails',
column: 'error_data',
dbIsInCorrectState(columnExists) {
return columnExists === false;
},
operation: commands.dropColumn,
operationVerb: 'Removing'
});

module.exports.config = {
transaction: true
};

0 comments on commit 65adbf7

Please sign in to comment.