Skip to content

Commit d5f5cf5

Browse files
committed
test
1 parent 6b0256e commit d5f5cf5

File tree

1 file changed

+4
-1
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+4
-1
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,9 @@ function initiate_upgrade {
312312
handle_extensions
313313

314314
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;"
315316
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;"
317318
# TODO: move to its own file
318319
psql -h localhost -U supabase_tmp -d postgres <<'EOSQL'
319320
do $$
@@ -383,6 +384,8 @@ begin
383384
alter role supabase_admin_ rename to supabase_admin;
384385
385386
-- role grants
387+
-- FIXME: restore the GRANTED BY value
388+
-- FIXME: restore ADMIN OPTION value
386389
for rec in
387390
select * from pg_auth_members where member = 'supabase_admin'::regrole
388391
loop

0 commit comments

Comments
 (0)