cleanup-and-test #1
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
from logging.config import fileConfig
|
||||
|
||||
from alembic import context
|
||||
@@ -9,6 +10,10 @@ config = context.config
|
||||
fileConfig(config.config_file_name)
|
||||
target_metadata = Base.metadata
|
||||
|
||||
# Use SYNC_DATABASE_URL env var if set, otherwise fall back to alembic.ini
|
||||
if os.getenv("SYNC_DATABASE_URL"):
|
||||
config.set_main_option("sqlalchemy.url", os.getenv("SYNC_DATABASE_URL"))
|
||||
|
||||
|
||||
def run_migrations_offline():
|
||||
url = config.get_main_option("sqlalchemy.url")
|
||||
|
||||
Reference in New Issue
Block a user