From: Sebastian Bayer Date: Wed, 25 Oct 2023 07:54:50 +0000 (+0200) Subject: Update of the no-empty-migrations snippet to work with alembic check, see https:... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeb7cdab9559b0500be8f1543fad97f5305f2b0f;p=thirdparty%2Fsqlalchemy%2Falembic.git Update of the no-empty-migrations snippet to work with alembic check, see https://github.com/sqlalchemy/alembic/discussions/1332 --- diff --git a/docs/build/cookbook.rst b/docs/build/cookbook.rst index f5cf6cbb..cde13914 100644 --- a/docs/build/cookbook.rst +++ b/docs/build/cookbook.rst @@ -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():