]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add length parameter in `Enum`
authorFederico Caselli <cfederico87@gmail.com>
Tue, 24 Mar 2020 20:06:04 +0000 (21:06 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 6 Apr 2020 18:03:22 +0000 (20:03 +0200)
commit040bbc9e8830d30a7cbeb9d35bc691dad2323162
treeec3144c45328b15089955d4c40a934aeea2f2125
parent4227ef3d10aec4e03bd872a31476dc6ad6e9db0d
Add length parameter in `Enum`

The `Enum` type now supports the parameter `Enum.length`
to specify the length of the VARCHAR column to create when using
non native enums by setting `Enum.native_enum` to `False`

Fixes: #5183
Change-Id: Iea05dc8cd9e33959bb968b394fb10a7dd068c873
(cherry picked from commit 3e2af98adfdcbf33ff5d8c2da15962c001344d64)
doc/build/changelog/unreleased_13/5183.rst [new file with mode: 0644]
lib/sqlalchemy/sql/sqltypes.py
test/sql/test_types.py