We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccab863 commit 1747f29Copy full SHA for 1747f29
migrations/db/migrations/20211124212715_update-auth-owner.sql
@@ -1,8 +1,12 @@
1
-- migrate:up
2
3
-- update owner for auth.uid, auth.role and auth.email functions
4
-ALTER FUNCTION auth.uid owner to supabase_auth_admin;
5
-ALTER FUNCTION auth.role owner to supabase_auth_admin;
6
-ALTER FUNCTION auth.email owner to supabase_auth_admin;
7
-
+DO $$
+BEGIN
+ ALTER FUNCTION auth.uid owner to supabase_auth_admin;
+ ALTER FUNCTION auth.role owner to supabase_auth_admin;
8
+ ALTER FUNCTION auth.email owner to supabase_auth_admin;
9
+EXCEPTION WHEN OTHERS THEN
10
+ RAISE WARNING 'Error encountered when changing owner of auth.uid, auth.role or auth.email to supabase_auth_admin';
11
+END $$;
12
-- migrate:down
0 commit comments