Skip to content

Commit ee4ad71

Browse files
committed
test
1 parent a20649a commit ee4ad71

File tree

1 file changed

+9
-2
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+9
-2
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,15 @@ begin
391391
execute(format(
392392
'grant %I to postgres %s granted by %I;',
393393
rec.roleid::regrole,
394-
case when rec.admin_option then 'with admin option' else '' end,
395-
rec.grantor::regrole
394+
case
395+
when rec.admin_option then 'with admin option'
396+
else ''
397+
end,
398+
case
399+
when rec.grantor = 'postgres'::regrole then 'supabase_admin'
400+
when rec.grantor = 'supabase_admin'::regrole then 'postgres'
401+
else rec.grantor::regrole
402+
end
396403
));
397404
end loop;
398405

0 commit comments

Comments
 (0)