Files
thrilltrack-explorer/supabase/migrations/20250929193317_8e815f59-2c41-45d5-9792-95d91a476ebd.sql
2025-09-29 19:34:54 +00:00

18 lines
751 B
SQL

-- Update content_submissions submission_type to support all entity types
ALTER TABLE public.content_submissions
DROP CONSTRAINT IF EXISTS content_submissions_submission_type_check;
ALTER TABLE public.content_submissions
ADD CONSTRAINT content_submissions_submission_type_check
CHECK (submission_type IN (
'park',
'ride',
'review',
'photo',
'manufacturer',
'operator',
'designer',
'property_owner'
));
COMMENT ON COLUMN public.content_submissions.content IS 'JSONB structure: { title?, photos: Array<{url, caption?, title?, date?, order}>, context: "park"|"ride"|"manufacturer"|"operator"|"designer"|"property_owner", entity_id: string, park_id?: string (legacy), ride_id?: string (legacy), company_id?: string (legacy) }';