chatdesk-ui/postgres_15.8.1.044/migrations/db/migrations/20211124212715_update-auth-...

25 lines
701 B
SQL

-- migrate:up
-- update owner for auth.uid, auth.role and auth.email functions
DO $$
BEGIN
ALTER FUNCTION auth.uid owner to supabase_auth_admin;
EXCEPTION WHEN OTHERS THEN
RAISE WARNING 'Error encountered when changing owner of auth.uid to supabase_auth_admin';
END $$;
DO $$
BEGIN
ALTER FUNCTION auth.role owner to supabase_auth_admin;
EXCEPTION WHEN OTHERS THEN
RAISE WARNING 'Error encountered when changing owner of auth.role to supabase_auth_admin';
END $$;
DO $$
BEGIN
ALTER FUNCTION auth.email owner to supabase_auth_admin;
EXCEPTION WHEN OTHERS THEN
RAISE WARNING 'Error encountered when changing owner of auth.email to supabase_auth_admin';
END $$;
-- migrate:down