]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Include missing part of env.py 1172/head
authorSam Bull <aa6bs0@sambull.org>
Sat, 11 Feb 2023 23:44:40 +0000 (23:44 +0000)
committerGitHub <noreply@github.com>
Sat, 11 Feb 2023 23:44:40 +0000 (23:44 +0000)
docs/build/cookbook.rst

index 8ac5bfc00dab9861a3b505dde3b12896a03ce741..b8acb390241d8bbf5cc801fcd96da768ca8f21a5 100644 (file)
@@ -1562,6 +1562,12 @@ together, and ``env.py`` as follows works::
         else:
             do_run_migrations(connectable)
 
+
+    if context.is_offline_mode():
+        run_migrations_offline()
+    else:
+        run_migrations_online()
+
 Above, using an asyncio database URL in ``alembic.ini`` one can run
 commands such as ``alembic upgrade`` from the command line.  Programmatically,
 the same ``env.py`` file can be invoked using asyncio as::