Finished schema creation
Added Navbar functionality Added header
This commit is contained in:
@@ -4,6 +4,7 @@ from logging.config import fileConfig
|
||||
from flask import current_app
|
||||
|
||||
from alembic import context
|
||||
from sqlalchemy import NullPool, engine_from_config, text
|
||||
|
||||
from eveai_app.models.user import Tenant
|
||||
|
||||
@@ -92,6 +93,7 @@ def run_migrations_online():
|
||||
)
|
||||
|
||||
with connectable.connect() as connection:
|
||||
print(tenants)
|
||||
for tenant in tenants:
|
||||
logger.info(f"Migrating tenant: {tenant}")
|
||||
# set search path on the connection, which ensures that
|
||||
@@ -99,7 +101,7 @@ def run_migrations_online():
|
||||
# in terms of this schema by default
|
||||
connection.execute(text(f'SET search_path TO "{tenant}"'))
|
||||
# in SQLAlchemy v2+ the search path change needs to be committed
|
||||
# connection.commit()
|
||||
connection.commit()
|
||||
|
||||
# make use of non-supported SQLAlchemy attribute to ensure
|
||||
# the dialect reflects tables in terms of the current tenant name
|
||||
|
||||
Reference in New Issue
Block a user