From bc94940403b0303dc11dc4d3e24005dca1ad35c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arwid=20Thornstr=C3=B6m?= Date: Thu, 8 May 2025 11:15:34 +0200 Subject: [PATCH] added poi columns to rooms table (#477) --- migrations/000.549.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 migrations/000.549.sql diff --git a/migrations/000.549.sql b/migrations/000.549.sql new file mode 100644 index 0000000..84d6328 --- /dev/null +++ b/migrations/000.549.sql @@ -0,0 +1,8 @@ +ALTER TABLE rooms + ADD COLUMN poi_x REAL NOT NULL DEFAULT 0.5, + ADD COLUMN poi_y REAL NOT NULL DEFAULT 0.5; + +-- Add check constraints to ensure values stay between 0 and 1 +ALTER TABLE rooms + ADD CONSTRAINT poi_x_range CHECK (poi_x >= 0 AND poi_x <= 1), + ADD CONSTRAINT poi_y_range CHECK (poi_y >= 0 AND poi_y <= 1);