summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTilman Vatteroth2020-11-30 17:39:50 +0100
committerTilman Vatteroth2020-11-30 17:39:50 +0100
commit4ae80a3ed08aac4dddc2bddb80b5da5d7e20df86 (patch)
tree7744a3ea9e018460bd4d61d433250887e03aa613 /lib
parenta157599884c98667ca8dc608e6de4d70d0a1812d (diff)
[Migrations] Replace similar code
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/migrations/20150702001020-update-to-0_3_1.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/migrations/20150702001020-update-to-0_3_1.js b/lib/migrations/20150702001020-update-to-0_3_1.js
index b5b956c7..7bea58ca 100644
--- a/lib/migrations/20150702001020-update-to-0_3_1.js
+++ b/lib/migrations/20150702001020-update-to-0_3_1.js
@@ -22,9 +22,8 @@ module.exports = {
})
}).catch(function (error) {
if (error.message === 'SQLITE_ERROR: duplicate column name: shortid' ||
- error.message === "ER_DUP_FIELDNAME: Duplicate column name 'shortid'" ||
error.message === 'column "shortid" of relation "Notes" already exists' ||
- error.message === 'ERROR: Duplicate column name \'shortid\'') {
+ error.message.toLowerCase().includes("duplicate column name 'shortid'")) {
// eslint-disable-next-line no-console
console.log('Migration has already run… ignoring.')
} else {