0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Added email.error_data column migration

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`
This commit is contained in:
Kevin Ansfield 2019-11-22 16:44:10 +00:00
parent 6a057fad99
commit 65adbf7514

View file

@ -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
};