diff --git a/cmd/atlas-loader/main.go b/cmd/atlas-loader/main.go index 1a14d34..9c6d6ae 100644 --- a/cmd/atlas-loader/main.go +++ b/cmd/atlas-loader/main.go @@ -26,6 +26,7 @@ func main() { &model.NotificationTargetUser{}, &model.Room{}, &model.RoomChange{}, + &model.RoomReservation{}, &model.Route{}, &model.Stop{}, &model.StopTime{}, diff --git a/migrations/20261109082617.sql b/migrations/20261109082617.sql new file mode 100644 index 0000000..565b181 --- /dev/null +++ b/migrations/20261109082617.sql @@ -0,0 +1,18 @@ +-- Create "room_reservations" table +CREATE TABLE "public"."room_reservations" ( + "id" uuid NOT NULL DEFAULT gen_random_uuid(), + "created_at" timestamptz NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" timestamptz NULL DEFAULT CURRENT_TIMESTAMP, + "title" text NOT NULL, + "room_id" uuid NOT NULL, + "start_time" timestamptz NOT NULL, + "end_time" timestamptz NOT NULL, + PRIMARY KEY ("id"), + CONSTRAINT "fk_room_reservations_room" FOREIGN KEY ("room_id") REFERENCES "public"."rooms" ("id") ON UPDATE CASCADE ON DELETE NO ACTION +); +-- Create index "idx_room_reservations_end_time" to table: "room_reservations" +CREATE INDEX "idx_room_reservations_end_time" ON "public"."room_reservations" ("end_time"); +-- Create index "idx_room_reservations_room_id" to table: "room_reservations" +CREATE INDEX "idx_room_reservations_room_id" ON "public"."room_reservations" ("room_id"); +-- Create index "idx_room_reservations_start_time" to table: "room_reservations" +CREATE INDEX "idx_room_reservations_start_time" ON "public"."room_reservations" ("start_time"); diff --git a/migrations/atlas.sum b/migrations/atlas.sum index 104a799..dcce6ae 100644 --- a/migrations/atlas.sum +++ b/migrations/atlas.sum @@ -1,6 +1,7 @@ -h1:y3nJdSTtRXfZRrKUzPAXS72F6PNYXtdtL+24iD4E/0U= +h1:uKXzbwHVIc3iH1RdrgAb/VfaExDbae5o9MMYHpGEY/s= 20260510075358_baseline.sql h1:S1fQ5KJJJ/pulk/6WuV0GWMpC7jrMdg8uFGScIAr18A= 20260510085829.sql h1:Jo1Alddu/vC51J4L/XttheZYY7FERVzLgRQLPStkHwk= 20260716124002.sql h1:QVA3ZUNeL5M7ohqzdf7ZQ6RefAuQ5UGD1/SKZIje0OU= 20260925010634.sql h1:Iy1Ijhct+EwD1Bc+xhnYmfNzI7GJqiCgoTD2+GhWBMo= 20261007110329_add_gtfs.sql h1:9FBgvImEti22hqkA7WkzUmR1Ri4bzgDTL/7i/cCB24c= +20261109082617.sql h1:VGET/ElRVBDBnPPv8/ISBqolMTORqpRH3Wh9wzRkEYI=