From 406342042b2b575d3d7d74203e096f387ec0a2da Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Thu, 28 Mar 2024 00:09:21 +0100 Subject: [PATCH] made sure that reverting the `roomfinder_schedules`-PK changes works too --- server/backend/migration/20240327000000.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/backend/migration/20240327000000.go b/server/backend/migration/20240327000000.go index e2c40977..9f7d2388 100644 --- a/server/backend/migration/20240327000000.go +++ b/server/backend/migration/20240327000000.go @@ -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 @@ -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