Make migration error checking more resilient
This commit is contained in:
parent
414ae577f1
commit
4519f231a3
@ -54,8 +54,9 @@ export const MIGRATIONS: Migration[] = [{
|
||||
|
||||
export const migrationForError = (e: any) =>
|
||||
MIGRATIONS.find(migration =>
|
||||
migration.fields.some(field =>
|
||||
new RegExp(`column "${field}" of relation "photos" does not exist`, 'i')
|
||||
.test(e.message),
|
||||
),
|
||||
migration.fields.some(field =>(
|
||||
// eslint-disable-next-line max-len
|
||||
new RegExp(`column "${field}" of relation "photos" does not exist`, 'i').test(e.message) ||
|
||||
new RegExp(`column "${field}" does not exist`, 'i').test(e.message)
|
||||
)),
|
||||
);
|
||||
Loading…
Reference in New Issue
Block a user