]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
docs: Add missing engine.dispose() call to the asyncio cookbook example. (#973)
authorDanCardin <DanCardin@users.noreply.github.com>
Tue, 21 Dec 2021 19:07:23 +0000 (14:07 -0500)
committerGitHub <noreply@github.com>
Tue, 21 Dec 2021 19:07:23 +0000 (20:07 +0100)
alembic/templates/async/env.py
docs/build/cookbook.rst

index ade3dc4035f85375665981578ebf6b597516e001..4ac2b6ac36cf6ef21a08419d2dd77216656e3cd6 100644 (file)
@@ -77,6 +77,8 @@ async def run_migrations_online():
     async with connectable.connect() as connection:
         await connection.run_sync(do_run_migrations)
 
+    await connectable.dispose()
+
 
 if context.is_offline_mode():
     run_migrations_offline()
index 68775801993d1a1b4ae659de9296c7357e517198..e464cc8b6d4d1be444997821c65e54861816dac4 100644 (file)
@@ -1485,6 +1485,8 @@ file that's used by Alembic to start its operations. In particular only
         async with connectable.connect() as connection:
             await connection.run_sync(do_run_migrations)
 
+        await connectable.dispose()
+
 
     if context.is_offline_mode():
         run_migrations_offline()