summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2023-03-22 18:00:59 +0000
committerStephen Finucane <stephenfin@redhat.com>2023-03-23 11:01:07 +0000
commitac25a28d1fbec0e7c52646a29bd01b865906c447 (patch)
tree56e7ce35f69dafd627da23d20fa9ac9a16a2c9f9
parentecad14368e2c2347a5d7b6f745413347a6934e37 (diff)
downloadheat-ac25a28d1fbec0e7c52646a29bd01b865906c447.tar.gz
db: Wire up for auto-generation
Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: Ic1544f3c5af482c8931b77a7faea059cc3c497dc
-rw-r--r--heat/db/sqlalchemy/migrations/env.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/heat/db/sqlalchemy/migrations/env.py b/heat/db/sqlalchemy/migrations/env.py
index b0df5e9b3..138d28374 100644
--- a/heat/db/sqlalchemy/migrations/env.py
+++ b/heat/db/sqlalchemy/migrations/env.py
@@ -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: