From 94d6a55b4af0547601d69e6a7f3f98c04375cd86 Mon Sep 17 00:00:00 2001 From: Mike Pond <32133001+P0NDER0SA@users.noreply.github.com> Date: Wed, 29 May 2024 13:30:03 -0400 Subject: [PATCH] Update 0451_create_db_users.py After further discussions with the team, we have decided that we should make our downgrades more representative of a reversal of what an upgrade does, but while also safely been tested for upgrade and downgrade paths --- migrations/versions/0451_create_db_users.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migrations/versions/0451_create_db_users.py b/migrations/versions/0451_create_db_users.py index cd2f5cb7fc..afe062a98e 100644 --- a/migrations/versions/0451_create_db_users.py +++ b/migrations/versions/0451_create_db_users.py @@ -22,7 +22,9 @@ def upgrade(): def downgrade(): - return + for role in roles: + op.execute(f"REVOKE {super_role} FROM {role};") + op.execute(f"DROP ROLE IF EXISTS {role};") def create_role_if_not_exist(role):