Add migration to include 'staff' in user_type_enum
cgen-6f34760fced84f778f69d019d2a0bb8f
This commit is contained in:
parent
c65ae5daf1
commit
0b903161ce
1 changed files with 11 additions and 0 deletions
11
supabase/migrations/20251018_add_staff_to_user_type_enum.sql
Normal file
11
supabase/migrations/20251018_add_staff_to_user_type_enum.sql
Normal file
|
|
@ -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$$;
|
||||
Loading…
Reference in a new issue