Merge "db: Wire up for auto-generation"

This commit is contained in:
Zuul 2023-03-30 04:24:19 +00:00 committed by Gerrit Code Review
commit 2258a06259
1 changed files with 4 additions and 6 deletions

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 heat.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: