]> 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:05 +0000 (15:27 -0400)
commitbd1d6012dcbe5fbc6d1097a79d85b972b0d4fd8a
treebc685b00e84b4ccd74cd984f3868958117fc76bf
parent513a6e5bcea5dccabaf86166906233542a4669e7
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
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