summaryrefslogtreecommitdiff
path: root/lib/migrations/20160420180355-note-add-alias.js
diff options
context:
space:
mode:
authorDavid Mehren2020-12-02 20:42:07 +0100
committerGitHub2020-12-02 20:42:07 +0100
commitee227d3c009f88714b1563ef0d8245a9badbf6b9 (patch)
tree5228abf4c3dabbdf95afd138d98a13b4bab0a4e0 /lib/migrations/20160420180355-note-add-alias.js
parentdf0482ea689a97e62efe394203dab8778ff28a07 (diff)
parent0318ce3e8347342309f6f75f72b6ed5a83b03e52 (diff)
Merge pull request #610 from hedgedoc/fix/migration-error-message
Diffstat (limited to 'lib/migrations/20160420180355-note-add-alias.js')
-rw-r--r--lib/migrations/20160420180355-note-add-alias.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/migrations/20160420180355-note-add-alias.js b/lib/migrations/20160420180355-note-add-alias.js
index 82941a91..18afb9c0 100644
--- a/lib/migrations/20160420180355-note-add-alias.js
+++ b/lib/migrations/20160420180355-note-add-alias.js
@@ -8,7 +8,8 @@ module.exports = {
indicesType: 'UNIQUE'
})
}).catch(function (error) {
- if (error.message === 'SQLITE_ERROR: duplicate column name: alias' || error.message === "ER_DUP_FIELDNAME: Duplicate column name 'alias'" || error.message === 'column "alias" of relation "Notes" already exists') {
+ if (error.message.toLowerCase().includes('duplicate column name') ||
+ error.message === 'column "alias" of relation "Notes" already exists') {
// eslint-disable-next-line no-console
console.log('Migration has already run… ignoring.')
} else {