Skip to content

Commit

Permalink
fix: account for public grantee
Browse files Browse the repository at this point in the history
  • Loading branch information
soedirgo committed Sep 26, 2024
1 parent b3d2228 commit eea5ee0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ begin
end
, case when rec.grantee = 'postgres'::regrole then 'supabase_admin'
when rec.grantee = 'supabase_admin'::regrole then 'postgres'
when rec.grantee = 0 then 'public'
else rec.grantee::regrole
end
));
Expand All @@ -382,7 +383,7 @@ begin
when obj->>'objtype' = 'T' then 'types'
when obj->>'objtype' = 'n' then 'schemas'
end
, rec.grantee::regrole
, case when rec.grantee = 0 then 'public' else rec.grantee::regrole end
, case when rec.is_grantable then 'with grant option' else '' end
));
end if;
Expand Down

0 comments on commit eea5ee0

Please sign in to comment.