summaryrefslogtreecommitdiff
path: root/lib/migrations/20161009040430-support-delete-note.js
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-09-06 14:50:37 +0100
committerGitHub2018-09-06 14:50:37 +0100
commitdbbc1f6ac867a68f19bbe28704223729f253681e (patch)
treeaebc9677e6aa6f94622e02b8b48bf3c7d8ca578f /lib/migrations/20161009040430-support-delete-note.js
parentf27e11adabd601caa246fa306e24224aebe36467 (diff)
parent81e3d7bd00686b5e4d1e0b53db3eca9901c183c1 (diff)
Merge pull request #939 from SISheogorath/fix/migrationsV2
Extend migration error handling
Diffstat (limited to '')
-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