change the alembic_revision table

This commit is contained in:
Waylon Walker 2023-05-22 08:06:40 -05:00
parent fb8c507f4c
commit 61d2945dc7
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
2 changed files with 8 additions and 1 deletions

View file

@ -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

View file

@ -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()