Skip to content

Commit f53c176

Browse files
committed
test
1 parent b7e15a5 commit f53c176

File tree

1 file changed

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

1 file changed

+2
-3
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,8 @@ function initiate_upgrade {
315315
# as bootstrap user to supabase_admin as bootstrap user.
316316

317317
echo "8. TODO"
318-
run_sql -c "alter role postgres superuser;"
319318
if [ "$OLD_BOOTSTRAP_USER" = "postgres" ]; then
320-
run_sql -c "create role supabase_tmp login superuser;"
319+
run_sql -c "alter role postgres superuser; create role supabase_tmp login superuser;"
321320
psql -h localhost -U supabase_tmp -d postgres <<-EOSQL
322321
begin;
323322
do $$
@@ -472,7 +471,7 @@ end
472471
$$;
473472
rollback;
474473
EOSQL
475-
run_sql -c "drop role supabase_tmp;"
474+
run_sql -c "alter role postgres nosuperuser; drop role supabase_tmp;"
476475
fi
477476

478477
if [ -z "$IS_NIX_UPGRADE" ]; then

0 commit comments

Comments
 (0)