From 6c857b7ff9df08e5f867b3806ee0e4d816dda7b2 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 21 Jun 2024 12:03:01 -0400 Subject: [PATCH] Fix wrong primary key on telehub spawn points. With the RegionUUID being created as a unique primary key only one spawn point could be created. Replaced the primary key with one using multiple columns to guarantee that each spawn point occupies a unique space in the region. Signed-off-by: UbitUmarov --- OpenSim/Data/PGSQL/Resources/RegionStore.migrations | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations index a49c5df143..03d58905c0 100644 --- a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations @@ -1285,4 +1285,11 @@ ALTER TABLE public.regionsettings WHEN "casino" = 1 THEN TRUE ELSE NULL END; -COMMIT; \ No newline at end of file +COMMIT; + +:VERSION 56 #----- Fix the constraints on the spawn points +BEGIN; +ALTER TABLE spawn_points DROP CONSTRAINT spawn_points_pkey; +ALTER TABLE spawn_points ADD CONSTRAINT spawn_points_pkey + PRIMARY KEY ("RegionUUID", "Yaw", "Pitch", "Distance"); +COMMIT;