diff --git a/migrations/000.568.sql b/migrations/000.568.sql new file mode 100644 index 0000000..f4eea30 --- /dev/null +++ b/migrations/000.568.sql @@ -0,0 +1,19 @@ +-- Reset the sequence for the rooms table's id column to the next available value +-- This ensures that future INSERTs without explicit id values will use the correct sequence number +-- and avoid primary key conflicts with existing records +SELECT setval(pg_get_serial_sequence('rooms', 'id'), COALESCE(MAX(id),0) + 1, false) +FROM rooms; + +-- Insert new rows into rooms table for rooms 119-129 (excluding 126) +INSERT INTO rooms (name, room_type_id, s3_suffix) VALUES + ('room119_wallpaper_standing', 2, 'standing/wallpaper/room119.jpg'), + ('room120_wallpaper_standing', 2, 'standing/wallpaper/room120.jpg'), + ('room121_wallpaper_standing', 2, 'standing/wallpaper/room121.jpg'), + ('room122_wallpaper_standing', 2, 'standing/wallpaper/room122.jpg'), + ('room123_wallpaper_standing', 2, 'standing/wallpaper/room123.jpg'), + ('room124_wallpaper_standing', 2, 'standing/wallpaper/room124.jpg'), + ('room125_wallpaper_standing', 2, 'standing/wallpaper/room125.jpg'), + ('room127_wallpaper_standing', 2, 'standing/wallpaper/room127.jpg'), + ('room128_wallpaper_standing', 2, 'standing/wallpaper/room128.jpg'), + ('room129_wallpaper_standing', 2, 'standing/wallpaper/room129.jpg'); +