]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Allow using Enum with length=None
authorEugene Toder <eltoder@gmail.com>
Tue, 22 Aug 2023 17:54:02 +0000 (13:54 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 23 Aug 2023 15:34:09 +0000 (11:34 -0400)
commit7cf836241aa72494b42b645a3ddec04b0a6e6061
tree8995170ce23c42632845ae15887a81f4d63b84ad
parent5f0c591c744ddf17cf5d886aec21e242eb58562f
Allow using Enum with length=None

Adjusted the :class:`_types.Enum` datatype to accept an argument of
``None`` for the :paramref:`_types.Enum.length` parameter, resulting in a
VARCHAR or other textual type with no length in the resulting DDL. This
allows for new elements of any length to be added to the type after it
exists in the schema.  Pull request courtesy Eugene Toder.

Fixes: #10269
Closes: #10274
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10274
Pull-request-sha: 651afaaea76c1ec868402cdd7106ec8b2de76254

Change-Id: I374ae9e5fa63da21a4cc87e323ce1a54acd6e39b
doc/build/changelog/unreleased_20/10269.rst [new file with mode: 0644]
lib/sqlalchemy/sql/sqltypes.py
test/sql/test_types.py