]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Allow SchemaType and Variant to work together
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 7 Mar 2017 17:53:00 +0000 (12:53 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 7 Mar 2017 21:24:18 +0000 (16:24 -0500)
commitc04870ba7b8098c7d408ad66f60efe7229496fde
tree48ce6b3cbb8225f85499e54dc92e7d58684812f7
parent9e627159733da48e2fd2d25de93589eb079a75f4
Allow SchemaType and Variant to work together

Added support for the :class:`.Variant` and the :class:`.SchemaType`
objects to be compatible with each other.  That is, a variant
can be created against a type like :class:`.Enum`, and the instructions
to create constraints and/or database-specific type objects will
propagate correctly as per the variant's dialect mapping.

Also added testing for some potential double-event scenarios
on TypeDecorator but it seems usually this doesn't occur.

Change-Id: I4a7e7c26b4133cd14e870f5bc34a1b2f0f19a14a
Fixes: #2892
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/sql/type_api.py
lib/sqlalchemy/util/langhelpers.py
test/dialect/postgresql/test_types.py
test/requirements.py
test/sql/test_metadata.py
test/sql/test_types.py