mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -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:
parent
6a057fad99
commit
65adbf7514
1 changed files 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
|
||||||
|
};
|
Loading…
Add table
Reference in a new issue