Add migration to include 'staff' in user_type_enum

cgen-6f34760fced84f778f69d019d2a0bb8f
This commit is contained in:
Builder.io 2025-10-18 21:03:22 +00:00
parent c65ae5daf1
commit 0b903161ce

View 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$$;