38980-vm/app-9w9pd00g5j41/supabase/migrations/00017_add_provider_role.sql
2026-03-04 18:25:09 +00:00

8 lines
344 B
SQL

-- Add 'provider' role to the allowed roles in profiles table
-- Drop the old constraint
ALTER TABLE profiles DROP CONSTRAINT IF EXISTS profiles_role_check;
-- Add new constraint with 'provider' role included
ALTER TABLE profiles ADD CONSTRAINT profiles_role_check
CHECK (role = ANY (ARRAY['user'::text, 'admin'::text, 'provider'::text]));