20 lines
1.2 KiB
SQL
20 lines
1.2 KiB
SQL
-- 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');
|
|
|