Skip to content

Commit

Permalink
made sure that reverting the roomfinder_schedules-PK changes works too
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Mar 27, 2024
1 parent ff7f150 commit 4063420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/backend/migration/20240327000000.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func migrate20240327000000() *gormigrate.Migration {
return err
}
// roomfinder_schedules does not have a PK set
if err := tx.Exec("alter table roomfinder_schedules add constraint roomfinder_schedules_pk primary key (room_id, start, end)").Error; err != nil {
if err := tx.Exec("alter table roomfinder_schedules add constraint primary key (room_id, start, end)").Error; err != nil {
return err
}
return nil
Expand Down Expand Up @@ -87,7 +87,7 @@ func migrate20240327000000() *gormigrate.Migration {
return err
}
// roomfinder_schedules does not have a PK set
if err := tx.Exec("alter table roomfinder_schedules drop key roomfinder_schedules_pk").Error; err != nil {
if err := tx.Exec("alter table roomfinder_schedules drop primary key").Error; err != nil {
return err
}
return nil
Expand Down

0 comments on commit 4063420

Please sign in to comment.