Update env.py

This commit is contained in:
Batuhan Erenler
2023-01-06 03:19:10 +03:00
committed by GitHub
parent c86e486c4d
commit 104aad87d9
+11 -7
View File
@@ -19,11 +19,13 @@ target_metadata = models.Base.metadata
def run_migrations_offline():
"""Run migrations in 'offline' mode.
"""
Run migrations in 'offline' mode.
This configures the context with just a URL and not an Engine,
though an Engine is acceptable here as well. By skipping the
Engine creation we don't even need a DBAPI to be available.
This configures the context with just a URL and not an Engine,
though an Engine is acceptable here as well. By skipping the
Engine creation we don't even need a DBAPI to be available.
"""
url = config.get_main_option("sqlalchemy.url")
context.configure(
@@ -37,10 +39,12 @@ def run_migrations_offline():
def run_migrations_online():
"""Run migrations in 'online' mode.
"""
Run migrations in 'online' mode.
In this scenario we need to create an Engine and associate a
connection with the context.
In this scenario we need to create an Engine and associate a
connection with the context.
"""
connectable = engine_from_config(
config.get_section(config.config_ini_section),