summaryrefslogtreecommitdiff
path: root/lib/migrations/20160112220142-note-add-lastchange.js
diff options
context:
space:
mode:
authorTilman Vatteroth2020-12-02 17:22:27 +0100
committerTilman Vatteroth2020-12-02 17:22:27 +0100
commit120225947f6c22c8e7f8b9c2b72f496784162647 (patch)
treea6b7e917da4f9832d72e04225510b628ddebb123 /lib/migrations/20160112220142-note-add-lastchange.js
parent4ae80a3ed08aac4dddc2bddb80b5da5d7e20df86 (diff)
Catch more errors
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Diffstat (limited to '')
-rw-r--r--lib/migrations/20160112220142-note-add-lastchange.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/migrations/20160112220142-note-add-lastchange.js b/lib/migrations/20160112220142-note-add-lastchange.js
index 69781cef..430e1cc1 100644
--- a/lib/migrations/20160112220142-note-add-lastchange.js
+++ b/lib/migrations/20160112220142-note-add-lastchange.js
@@ -8,7 +8,8 @@ module.exports = {
type: Sequelize.DATE
})
}).catch(function (error) {
- if (error.message === 'SQLITE_ERROR: duplicate column name: lastchangeuserId' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'lastchangeuserId'" || error.message === 'column "lastchangeuserId" of relation "Notes" already exists') {
+ if (error.message === 'column "lastchangeuserId" of relation "Notes" already exists' ||
+ error.message.toLowerCase().includes('duplicate column name')) {
// eslint-disable-next-line no-console
console.log('Migration has already run… ignoring.')
} else {