diff --git a/server/backend/migration/20240327000000.go b/server/backend/migration/20240327000000.go index fd89920a..37f6124d 100644 --- a/server/backend/migration/20240327000000.go +++ b/server/backend/migration/20240327000000.go @@ -18,6 +18,9 @@ func migrate20240327000000() *gormigrate.Migration { if err := tx.Exec("alter table news_alert drop foreign key if exists news_alert").Error; err != nil { return err } + if err := tx.Exec("alter table news_alert drop foreign key if exists news_alert_files_file_fk").Error; err != nil { + return err + } if err := tx.Exec("alter table news_alert add constraint news_alert_files_file_fk foreign key (file) references files (file) on delete cascade").Error; err != nil { return err }