This commit is contained in:
Alexey Masterov
2024-09-10 13:04:04 +02:00
parent 841b39f7c5
commit 9ac06ea3d9

View File

@@ -60,8 +60,10 @@ def setup(remote_pg: RemotePostgres):
"SELECT rolname FROM pg_catalog.pg_roles WHERE oid > 16384 AND rolname <> 'neondb_owner'"
)
log.info("Rows count: %s", cur.rowcount)
for role in cur:
cur.execute(f"DROP ROLE {role[0]}")
if cur.rowcount > 0:
for role in cur:
log.info("Role found: %s", role[0])
#cur.execute(f"DROP ROLE {role[0]}")
conn.commit()