|
|
896b32f |
From 0f87fecbf4848d65fb66bfbf8fceb3e1e63ac3ae Mon Sep 17 00:00:00 2001
|
|
|
896b32f |
From: Mike Bayer <mike_mp@zzzcomputing.com>
|
|
|
896b32f |
Date: Fri, 18 May 2018 11:11:49 -0400
|
|
|
896b32f |
Subject: [PATCH] Implement native boolean check constraint flag in test suite
|
|
|
896b32f |
|
|
|
896b32f |
This is based on
|
|
|
896b32f |
https://github.com/zzzeek/sqlalchemy/commit/d2bacad469c0b07cc707b563e37e835abcf96eb8
|
|
|
896b32f |
which adds further specificity to SQL Server's boolean behaviors,
|
|
|
896b32f |
the test suite here expects a CHECK constraint to be rendered.
|
|
|
896b32f |
|
|
|
896b32f |
Change-Id: I2cce018135f292c7eeddcdbc724668ee9d9c9c48
|
|
|
896b32f |
---
|
|
|
896b32f |
alembic/testing/fixtures.py | 3 +++
|
|
|
896b32f |
1 file changed, 3 insertions(+)
|
|
|
896b32f |
|
|
|
896b32f |
diff --git a/alembic/testing/fixtures.py b/alembic/testing/fixtures.py
|
|
|
896b32f |
index e6c16dd..86d40a2 100644
|
|
|
896b32f |
--- a/alembic/testing/fixtures.py
|
|
|
896b32f |
+++ b/alembic/testing/fixtures.py
|
|
|
896b32f |
@@ -146,6 +146,9 @@ def assert_contains(self, sql):
|
|
|
896b32f |
ctx_dialect = _get_dialect(dialect)
|
|
|
896b32f |
if native_boolean is not None:
|
|
|
896b32f |
ctx_dialect.supports_native_boolean = native_boolean
|
|
|
896b32f |
+ # this is new as of SQLAlchemy 1.2.7 and is used by SQL Server,
|
|
|
896b32f |
+ # which breaks assumptions in the alembic test suite
|
|
|
896b32f |
+ ctx_dialect.non_native_boolean_check_constraint = True
|
|
|
896b32f |
if not as_sql:
|
|
|
896b32f |
def execute(stmt, *multiparam, **param):
|
|
|
896b32f |
if isinstance(stmt, string_types):
|