File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -312,8 +312,9 @@ function initiate_upgrade {
312
312
handle_extensions
313
313
314
314
echo " 8. Swap postgres & supabase_admin roles if upgrading from a project with postgres as bootstrap user"
315
+ run_sql -c " ALTER USER postgres WITH SUPERUSER;"
315
316
if [ " $OLD_BOOTSTRAP_USER " = " postgres" ]; then
316
- run_sql -c " alter role postgres superuser; create role supabase_tmp login superuser;"
317
+ run_sql -c " create role supabase_tmp login superuser;"
317
318
# TODO: move to its own file
318
319
psql -h localhost -U supabase_tmp -d postgres << 'EOSQL '
319
320
do $$
@@ -383,6 +384,8 @@ begin
383
384
alter role supabase_admin_ rename to supabase_admin;
384
385
385
386
-- role grants
387
+ -- FIXME: restore the GRANTED BY value
388
+ -- FIXME: restore ADMIN OPTION value
386
389
for rec in
387
390
select * from pg_auth_members where member = 'supabase_admin'::regrole
388
391
loop
You can’t perform that action at this time.
0 commit comments