mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 22:35:50 -04:00
Catch more errors
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
4ae80a3ed0
commit
120225947f
9 changed files with 31 additions and 10 deletions
|
@ -45,6 +45,13 @@ module.exports = {
|
|||
},
|
||||
onDelete: 'cascade'
|
||||
})
|
||||
}).catch(function (error) {
|
||||
if (error.message.toLowerCase().includes('duplicate key on write or update')) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Migration has already run… ignoring.')
|
||||
} else {
|
||||
throw error
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue