diff options
author | Tilman Vatteroth | 2020-11-30 17:31:55 +0100 |
---|---|---|
committer | Tilman Vatteroth | 2020-11-30 17:31:55 +0100 |
commit | a157599884c98667ca8dc608e6de4d70d0a1812d (patch) | |
tree | 30b44282ed6a785db22c092179549f78d0129af2 /lib | |
parent | 116fddd584a9d0927ce1109484826f6bc4074090 (diff) |
[Migrations] Add variant of error message to catch block
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.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/migrations/20150702001020-update-to-0_3_1.js b/lib/migrations/20150702001020-update-to-0_3_1.js index b941048e..b5b956c7 100644 --- a/lib/migrations/20150702001020-update-to-0_3_1.js +++ b/lib/migrations/20150702001020-update-to-0_3_1.js @@ -21,7 +21,10 @@ module.exports = { defaultValue: 0 }) }).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') { + 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\'') { // eslint-disable-next-line no-console console.log('Migration has already run… ignoring.') } else { |