From 8daa52d1e9db93e5bf901d41c90993d3fff3896d Mon Sep 17 00:00:00 2001 From: Josako Date: Thu, 3 Apr 2025 14:23:22 +0200 Subject: [PATCH] - Small corrections to the role definitions (Tenant Tester and Tenant Financial Roles are no longer required) --- .../versions/f0ab991a6411_add_financial_role.py | 15 +++++++-------- scripts/initialize_data.py | 10 +++++----- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/migrations/public/versions/f0ab991a6411_add_financial_role.py b/migrations/public/versions/f0ab991a6411_add_financial_role.py index eb9d64b..bc65684 100644 --- a/migrations/public/versions/f0ab991a6411_add_financial_role.py +++ b/migrations/public/versions/f0ab991a6411_add_financial_role.py @@ -18,19 +18,18 @@ depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### - op.execute(""" - INSERT INTO public.role (name, description) - VALUES ('Tenant Financial', 'Role for managing tenant financial operations'); - """) + # + pass # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### - op.execute(""" - DELETE FROM public.role - WHERE name = 'Tenant Financial'; - """) + # op.execute(""" + # DELETE FROM public.role + # WHERE name = 'Tenant Financial'; + # """) + pass # ### end Alembic commands ### diff --git a/scripts/initialize_data.py b/scripts/initialize_data.py index 0c6874d..eef0a3e 100644 --- a/scripts/initialize_data.py +++ b/scripts/initialize_data.py @@ -38,11 +38,11 @@ def initialize_data(): tenant_admin_role = Role(name="Tenant Admin", description="Users allowed to manage tenants") db.session.add(tenant_admin_role) db.session.commit() - tenant_tester_role = Role.query.filter_by(name="Tenant Tester").first() - if tenant_tester_role is None: - tenant_test_role = Role(name="Tenant Tester", description="Users allowed to test tenants") - db.session.add(tenant_test_role) - db.session.commit() + # tenant_tester_role = Role.query.filter_by(name="Tenant Tester").first() + # if tenant_tester_role is None: + # tenant_test_role = Role(name="Tenant Tester", description="Users allowed to test tenants") + # db.session.add(tenant_test_role) + # db.session.commit() # Check if any users exist if User.query.first() is None: