8 lines
344 B
SQL
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])); |