]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Update of the no-empty-migrations snippet to work with alembic check, see https:... 1338/head
authorSebastian Bayer <BayerSe@gmail.com>
Wed, 25 Oct 2023 07:54:50 +0000 (09:54 +0200)
committerGitHub <noreply@github.com>
Wed, 25 Oct 2023 07:54:50 +0000 (09:54 +0200)
docs/build/cookbook.rst

index f5cf6cbbc685c12a789c21c1768d97361089f1fb..cde139146ee65a711676fab02c7d6ce6fc2ab5fa 100644 (file)
@@ -917,7 +917,7 @@ any operations::
             directives: list[MigrationScript],
         ):
             assert config.cmd_opts is not None
-            if config.cmd_opts.autogenerate:
+            if getattr(config.cmd_opts, 'autogenerate', False):
                 script = directives[0]
                 assert script.upgrade_ops is not None
                 if script.upgrade_ops.is_empty():