change the alembic_revision table
This commit is contained in:
parent
fb8c507f4c
commit
61d2945dc7
2 changed files with 8 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
[alembic]
|
||||
# path to migration scripts
|
||||
script_location = migrations
|
||||
project = learn_sql_model
|
||||
|
||||
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
|
||||
# Uncomment the line below if you want the files to be prepended with date and time
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ def run_migrations_offline() -> None:
|
|||
target_metadata=target_metadata,
|
||||
literal_binds=True,
|
||||
dialect_opts={"paramstyle": "named"},
|
||||
version_table=f'{config.get_main_option("project")}_alembic_version',
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
|
|
@ -74,7 +75,12 @@ def run_migrations_online() -> None:
|
|||
)
|
||||
|
||||
with connectable.connect() as connection:
|
||||
context.configure(connection=connection, target_metadata=target_metadata)
|
||||
context.configure(
|
||||
connection=connection,
|
||||
target_metadata=target_metadata,
|
||||
render_as_batch=True,
|
||||
version_table=f'{config.get_main_option("project")}_alembic_version',
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue