File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -384,13 +384,16 @@ begin
384
384
alter role supabase_admin_ rename to supabase_admin;
385
385
386
386
-- role grants
387
- -- FIXME: restore the GRANTED BY value
388
- -- FIXME: restore ADMIN OPTION value
389
387
for rec in
390
388
select * from pg_auth_members where member = 'supabase_admin'::regrole
391
389
loop
392
390
execute(format('revoke %I from supabase_admin;', rec.roleid::regrole));
393
- execute(format('grant %I to postgres;', rec.roleid::regrole));
391
+ execute(format(
392
+ 'grant %I to postgres %s granted by %I;',
393
+ rec.roleid::regrole,
394
+ case when rec.admin_option then 'with admin option' else '' end,
395
+ rec.grantor::regrole
396
+ ));
394
397
end loop;
395
398
396
399
-- role passwords
You can’t perform that action at this time.
0 commit comments