permissions groups
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
from logging.config import fileConfig
|
||||
|
||||
|
||||
from src.models.database_models.model import engine, Model
|
||||
import src.models.database_models.model as models
|
||||
|
||||
from sqlalchemy import engine_from_config
|
||||
from sqlalchemy import pool
|
||||
|
||||
@@ -18,7 +22,8 @@ if config.config_file_name is not None:
|
||||
# for 'autogenerate' support
|
||||
# from myapp import mymodel
|
||||
# target_metadata = mymodel.Base.metadata
|
||||
target_metadata = None
|
||||
target_metadata = Model.metadata
|
||||
config.set_main_option("sqlalchemy.url", engine.url.render_as_string(hide_password=False))
|
||||
|
||||
# other values from the config, defined by the needs of env.py,
|
||||
# can be acquired:
|
||||
@@ -65,7 +70,7 @@ def run_migrations_online() -> None:
|
||||
|
||||
with connectable.connect() as connection:
|
||||
context.configure(
|
||||
connection=connection, target_metadata=target_metadata
|
||||
connection=connection, target_metadata=target_metadata, render_as_batch=True
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
|
||||
Reference in New Issue
Block a user