From 104aad87d9170368d4f99927de384581f7d09678 Mon Sep 17 00:00:00 2001 From: Batuhan Erenler <40266535+batuhanerenler@users.noreply.github.com> Date: Fri, 6 Jan 2023 03:19:10 +0300 Subject: [PATCH] Update env.py --- backend/alembic/env.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/backend/alembic/env.py b/backend/alembic/env.py index 8bd4fc72..9f260835 100644 --- a/backend/alembic/env.py +++ b/backend/alembic/env.py @@ -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),