summaryrefslogtreecommitdiff
path: root/lib/migrations/20161009040430-support-delete-note.js
diff options
context:
space:
mode:
authorSheogorath2018-09-05 15:08:32 +0100
committerSheogorath2018-09-05 16:19:35 +0100
commit81e3d7bd00686b5e4d1e0b53db3eca9901c183c1 (patch)
tree7ea1d63f9b645cc793bfa96aa6ba83fa7a783ecf /lib/migrations/20161009040430-support-delete-note.js
parent007f25227358f7ee697a2cf87364830f4569583d (diff)
Extend migration error handling
The current error handling seems to conflict with some sequelize versions. So we add a second version of it in our excemptions. I'm not happy about it, but when it helps to prevent further migration breaking, it's worth it. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'lib/migrations/20161009040430-support-delete-note.js')
-rw-r--r--lib/migrations/20161009040430-support-delete-note.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/migrations/20161009040430-support-delete-note.js b/lib/migrations/20161009040430-support-delete-note.js
index 4df7a81c..39e6f7fb 100644
--- a/lib/migrations/20161009040430-support-delete-note.js
+++ b/lib/migrations/20161009040430-support-delete-note.js
@@ -2,7 +2,7 @@
module.exports = {
up: function (queryInterface, Sequelize) {
return queryInterface.addColumn('Notes', 'deletedAt', Sequelize.DATE).catch(function (error) {
- if (error.message === "ER_DUP_FIELDNAME: Duplicate column name 'deletedAt'") {
+ if (error.message === "ER_DUP_FIELDNAME: Duplicate column name 'deletedAt'" || error.message === 'column "deletedAt" of relation "Notes" already exists') {
console.log('Migration has already run… ignoring.')
} else {
throw error