Set create_constraint=True for boolean constraint test

SQLAlchemy will be defaulting create_constraint to
False in an upcoming major release [1].  As this
test relies upon the CHECK constraint being present,
set create_constraint to True.

[1] https://github.com/sqlalchemy/sqlalchemy/issues/5367

Change-Id: Ie822172ef797dc1bf8050d9b5cabe6782120ea45
This commit is contained in:
Mike Bayer 2020-06-03 13:57:56 -04:00
parent e8364207eb
commit 28b26ee946
1 changed files with 1 additions and 1 deletions

View File

@ -905,7 +905,7 @@ class TestMigrationUtils(db_test_base._DbTestCase):
table_name = 'abc'
table = Table(table_name, self.meta,
Column('id', Integer, primary_key=True),
Column('deleted', Boolean))
Column('deleted', Boolean(create_constraint=True)))
ck = [
const for const in table.constraints if
isinstance(const, CheckConstraint)][0]