Files
database/migrations/000.594.sql
T
Arwid ThornströmandGitHub fbe3bb77fc migrations for the roomtypes (#513)
* migrations for the roomtypes

* rename files

* updated types

* Correct migration numbers and cleanup
2025-12-16 10:40:30 +01:00

24 lines
780 B
SQL

-- Truncate roomtypes table and reset sequence to start fresh
TRUNCATE TABLE roomtypes RESTART IDENTITY CASCADE;
-- Insert all room types in the desired order with sequential IDs
INSERT INTO roomtypes (name) VALUES
('dining-room'), -- id 1
('living-room'), -- id 2
('kids-room'), -- id 3
('bedroom'), -- id 4
('office'), -- id 5
('baby-room'), -- id 6
('hallway'), -- id 7
('teen-room'), -- id 8
('bathroom'), -- id 9
('kitchen'), -- id 10
('ceiling'), -- id 11
('close-up'); -- id 12
UPDATE roomtypes SET admin_specific = TRUE WHERE name IN ('close-up');
-- Truncate room_roomtypes table to start fresh
TRUNCATE TABLE room_roomtypes;