From f8ff6fe03101ae37d7f0975f5d98935d865ed45c Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 17 Oct 2025 22:50:41 +0000 Subject: [PATCH] Fix: Add timeline_event to submission_items constraint --- ...7_167ad8ec-6fd6-488a-9b02-fc690aee69a2.sql | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 supabase/migrations/20251017225027_167ad8ec-6fd6-488a-9b02-fc690aee69a2.sql diff --git a/supabase/migrations/20251017225027_167ad8ec-6fd6-488a-9b02-fc690aee69a2.sql b/supabase/migrations/20251017225027_167ad8ec-6fd6-488a-9b02-fc690aee69a2.sql new file mode 100644 index 00000000..c5bd80d5 --- /dev/null +++ b/supabase/migrations/20251017225027_167ad8ec-6fd6-488a-9b02-fc690aee69a2.sql @@ -0,0 +1,24 @@ +-- Add 'timeline_event' to submission_items item_type constraint +ALTER TABLE public.submission_items +DROP CONSTRAINT IF EXISTS submission_items_item_type_check; + +ALTER TABLE public.submission_items +ADD CONSTRAINT submission_items_item_type_check +CHECK (item_type IN ( + 'park', + 'ride', + 'review', + 'photo', + 'ride_model', + 'manufacturer', + 'operator', + 'designer', + 'property_owner', + 'photo_edit', + 'photo_delete', + 'milestone', + 'timeline_event' +)); + +COMMENT ON CONSTRAINT submission_items_item_type_check ON public.submission_items IS +'Allowed item types: entities (park, ride, etc.), special ops (photo_edit, photo_delete), and events (milestone, timeline_event)'; \ No newline at end of file