Skip to content

Commit

Permalink
fixed drop indexes not working
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Mar 17, 2024
1 parent cd15f31 commit acbd37c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/backend/migration/20240317000000.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ func migrate20240317000000() *gormigrate.Migration {
ID: "20240317000000",
Migrate: func(tx *gorm.DB) error {
// delete legacy indexes
if err := tx.Exec("drop index searchTitle on event").Error; err != nil {
if err := tx.Exec("drop index if exists searchTitle on event").Error; err != nil {
return err
}
if err := tx.Exec("drop index search_index on roomfinder_rooms").Error; err != nil {
if err := tx.Exec("drop index if exists search_index on roomfinder_rooms").Error; err != nil {
return err
}
// first migrate the db
Expand Down

0 comments on commit acbd37c

Please sign in to comment.