]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
distinguish between string contraint name and defined
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Mar 2023 18:34:40 +0000 (13:34 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Mar 2023 19:09:04 +0000 (14:09 -0500)
commit3cf19f16631e54108e5f519348cba14521b7433e
tree2097dc67dfdd0dec3fb94317dde1fcf2b812f751
parentcd7b1a94cc90ca533a84b47332900888151e22d0
distinguish between string contraint name and defined

Take _NONE_NAME into account as a valid constraint name
and don't skip these constraints or consider them to be unnamed.
Thanks to typing this also revealed that previous batch versions
were also keying "_NONE_NAME" constraints as though they were named.

Fixed regression for 1.10.0 where :class:`.Constraint` objects were
suddenly required to have non-None name fields when using batch mode, which
was not previously a requirement.

Change-Id: If4a7191a00848b19cb124bc6da362f3bc6ce1472
Fixes: #1195
alembic/autogenerate/compare.py
alembic/operations/batch.py
alembic/operations/ops.py
alembic/operations/schemaobj.py
alembic/util/sqla_compat.py
docs/build/unreleased/1195.rst [new file with mode: 0644]
tests/test_batch.py