summaryrefslogtreecommitdiff
path: root/lib/migrations
diff options
context:
space:
mode:
authorTilman Vatteroth2020-12-02 19:39:06 +0100
committerTilman Vatteroth2020-12-02 19:39:06 +0100
commit0318ce3e8347342309f6f75f72b6ed5a83b03e52 (patch)
treee3f22ae25aedc7b02600be38d84dcf4a8ac86043 /lib/migrations
parent120225947f6c22c8e7f8b9c2b72f496784162647 (diff)
Add missing catch
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Diffstat (limited to 'lib/migrations')
-rw-r--r--lib/migrations/20160703062241-support-authorship.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/migrations/20160703062241-support-authorship.js b/lib/migrations/20160703062241-support-authorship.js
index 86054f1c..c54dde61 100644
--- a/lib/migrations/20160703062241-support-authorship.js
+++ b/lib/migrations/20160703062241-support-authorship.js
@@ -17,7 +17,8 @@ module.exports = {
updatedAt: Sequelize.DATE
})
}).catch(function (error) {
- if (error.message === 'SQLITE_ERROR: duplicate column name: authorship' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'authorship'" || error.message === 'column "authorship" of relation "Notes" already exists') {
+ if (error.message.toLowerCase().includes('duplicate column name') ||
+ error.message === 'column "authorship" of relation "Notes" already exists') {
// eslint-disable-next-line no-console
console.log('Migration has already run… ignoring.')
} else {