Skip to content

Commit

Permalink
Cases migration
Browse files Browse the repository at this point in the history
  • Loading branch information
dianaclarke committed Apr 8, 2021
1 parent ccb26aa commit f39d189
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from alembic import context

from conbench.config import Config
from conbench.db import engine
from conbench.entities import (
case,
Expand All @@ -22,7 +23,8 @@
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
config.set_main_option("sqlalchemy.url", str(engine.url))
sqlalchemy_url = str(engine.url) if engine else Config.SQLALCHEMY_DATABASE_URI
config.set_main_option("sqlalchemy.url", sqlalchemy_url)


# Interpret the config file for Python logging.
Expand Down

0 comments on commit f39d189

Please sign in to comment.