]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
SQL Server is not native boolean; add new flag for CHECK constraint
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 10 May 2018 15:39:06 +0000 (11:39 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 10 May 2018 19:27:32 +0000 (15:27 -0400)
commitf388d15704527c654cb715c66d23e94ebffd25f3
treebc1f3a5f41a85b47ce54f4323596f08065570ab5
parentf7b38a4a6027fd516efdd976a312a100a9a4e1e5
SQL Server is not native boolean; add new flag for CHECK constraint

Fixed a 1.2 regression caused by :ticket:`4061` where the SQL Server
"BIT" type would be considered to be "native boolean".  The goal here
was to avoid creating a CHECK constraint on the column, however the bigger
issue is that the BIT value does not behave like a true/false constant
and cannot be interpreted as a standalone expression, e.g.
"WHERE <column>".   The SQL Server dialect now goes back to being
non-native boolean, but with an extra flag that still avoids creating
the CHECK constraint.

Change-Id: I4765d2a2a00b0d14f50282603cc4d48d4739dac1
Fixes: #4250
(cherry picked from commit bd1d6012dcbe5fbc6d1097a79d85b972b0d4fd8a)
doc/build/changelog/unreleased_12/4250.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/testing/suite/test_types.py