summaryrefslogtreecommitdiff
path: root/lib/migrations/20161009040430-support-delete-note.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/migrations/20161009040430-support-delete-note.js')
-rw-r--r--lib/migrations/20161009040430-support-delete-note.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/migrations/20161009040430-support-delete-note.js b/lib/migrations/20161009040430-support-delete-note.js
index b7ee72c3..7b9b60cf 100644
--- a/lib/migrations/20161009040430-support-delete-note.js
+++ b/lib/migrations/20161009040430-support-delete-note.js
@@ -2,7 +2,8 @@
module.exports = {
up: function (queryInterface, Sequelize) {
return queryInterface.addColumn('Notes', 'deletedAt', Sequelize.DATE).catch(function (error) {
- if (error.message === 'SQLITE_ERROR: duplicate column name: deletedAt' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'deletedAt'" || error.message === 'column "deletedAt" of relation "Notes" already exists') {
+ if (error.message.toLowerCase().includes('duplicate column name') ||
+ error.message === 'column "deletedAt" of relation "Notes" already exists') {
// eslint-disable-next-line no-console
console.log('Migration has already run… ignoring.')
} else {