From 0b903161ce8e9db96118c379449226e72842645f Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 18 Oct 2025 21:03:22 +0000 Subject: [PATCH] Add migration to include 'staff' in user_type_enum cgen-6f34760fced84f778f69d019d2a0bb8f --- .../20251018_add_staff_to_user_type_enum.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 supabase/migrations/20251018_add_staff_to_user_type_enum.sql diff --git a/supabase/migrations/20251018_add_staff_to_user_type_enum.sql b/supabase/migrations/20251018_add_staff_to_user_type_enum.sql new file mode 100644 index 00000000..3c2e9ce6 --- /dev/null +++ b/supabase/migrations/20251018_add_staff_to_user_type_enum.sql @@ -0,0 +1,11 @@ +-- Add 'staff' value to user_type_enum if not exists +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM pg_type t + JOIN pg_enum e ON t.oid = e.enumtypid + WHERE t.typname = 'user_type_enum' AND e.enumlabel = 'staff' + ) THEN + ALTER TYPE user_type_enum ADD VALUE 'staff'; + END IF; +END$$;