You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh
-6Lines changed: 0 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -435,8 +435,6 @@ begin
435
435
update pg_db_role_setting set setconfig = supabase_admin_role_settings where setdatabase = 0 and setrole = 'supabase_admin'::regrole;
436
436
437
437
reassign owned by postgres to supabase_admin;
438
-
-- TODO
439
-
drop owned by postgres;
440
438
441
439
-- databases
442
440
for rec in
@@ -545,7 +543,6 @@ begin
545
543
from aclexplode((obj->>'acl')::aclitem[])
546
544
where grantee = 'postgres'::regrole
547
545
loop
548
-
execute(format('revoke all on schema %s from supabase_admin', (obj->>'oid')::regnamespace));
549
546
execute(format('grant %s on schema %s to postgres %s', rec.privilege_type, (obj->>'oid')::regnamespace, case when rec.is_grantable then 'with grant option' else '' end));
550
547
end loop;
551
548
end loop;
@@ -561,7 +558,6 @@ begin
561
558
from aclexplode((obj->>'acl')::aclitem[])
562
559
where grantee = 'postgres'::regrole
563
560
loop
564
-
execute(format('revoke all on type %s from supabase_admin', (obj->>'oid')::regtype));
565
561
execute(format('grant %s on type %s to postgres %s', rec.privilege_type, (obj->>'oid')::regtype, case when rec.is_grantable then 'with grant option' else '' end));
566
562
end loop;
567
563
end loop;
@@ -577,7 +573,6 @@ begin
577
573
from aclexplode((obj->>'acl')::aclitem[])
578
574
where grantee = 'postgres'::regrole
579
575
loop
580
-
execute(format('revoke all on function %s(%s) from supabase_admin', (obj->>'oid')::regproc, pg_get_function_identity_arguments((obj->>'oid')::regproc)));
581
576
execute(format('grant %s on function %s(%s) to postgres %s', rec.privilege_type, (obj->>'oid')::regproc, pg_get_function_identity_arguments((obj->>'oid')::regproc), case when rec.is_grantable then 'with grant option' else '' end));
582
577
end loop;
583
578
end loop;
@@ -595,7 +590,6 @@ begin
595
590
from aclexplode((obj->>'acl')::aclitem[])
596
591
where grantee = 'postgres'::regrole
597
592
loop
598
-
execute(format('revoke all on table %s from supabase_admin', (obj->>'oid')::oid::regclass));
599
593
execute(format('grant %s on table %s to postgres %s', rec.privilege_type, (obj->>'oid')::oid::regclass, case when rec.is_grantable then 'with grant option' else '' end));
0 commit comments