mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
[Migrations] Add variant of error message to catch block
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
116fddd584
commit
a157599884
1 changed files with 4 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue