db: Wire up for auto-generation

Change-Id: I81b4c80b592230befb7bb315411b9f0b1214aee3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2023-07-13 11:58:52 +01:00
parent 50a46964a2
commit 13ae6c01c9

View File

@ -12,10 +12,11 @@
from logging.config import fileConfig
from alembic import context
from sqlalchemy import engine_from_config
from sqlalchemy import pool
from alembic import context
from masakari.db.sqlalchemy import models
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
@ -26,11 +27,8 @@ config = context.config
if config.config_file_name is not None:
fileConfig(config.config_file_name)
# add your model's MetaData object here
# for 'autogenerate' support
# from myapp import mymodel
# target_metadata = mymodel.Base.metadata
target_metadata = None
# this is the MetaData object for the various models in the database
target_metadata = models.BASE.metadata
def run_migrations_offline() -> None: