diff options
Diffstat (limited to '')
-rw-r--r-- | lib/migrations/20160112220142-note-add-lastchange.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/migrations/20160112220142-note-add-lastchange.js b/lib/migrations/20160112220142-note-add-lastchange.js index b4e111b3..d0030d6b 100644 --- a/lib/migrations/20160112220142-note-add-lastchange.js +++ b/lib/migrations/20160112220142-note-add-lastchange.js @@ -7,6 +7,12 @@ module.exports = { return queryInterface.addColumn('Notes', 'lastchangeAt', { type: Sequelize.DATE }) + }).catch(function (error) { + if (error.message === "ER_DUP_FIELDNAME: Duplicate column name 'lastchangeuserId'") { + console.log('Migration has already run… ignoring.') + } else { + throw error + } }) }, |