diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-06-02 14:21:03 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-06-03 16:19:40 -0400 |
commit | 97cd0a5db8bb2e47f38899592740d1bc75ec0412 (patch) | |
tree | bea2062f7e2b3e60fd8b87bdba7e368cc8e87724 /test/dialect/postgresql/test_compiler.py | |
parent | c7c564b57f3ce2fee30b44f22db7baf2f0fa9fe0 (diff) | |
download | sqlalchemy-97cd0a5db8bb2e47f38899592740d1bc75ec0412.tar.gz |
Default create_constraint to False
The :paramref:`.Enum.create_constraint` and
:paramref:`.Boolean.create_constraint` parameters now default to False,
indicating when a so-called "non-native" version of these two datatypes is
created, a CHECK constraint will not be generated by default. These CHECK
constraints present schema-management maintenance complexities that should
be opted in to, rather than being turned on by default.
Fixes: #5367
Change-Id: I0a3fb608ce32143fa757546cc17ba2013e93272a
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r-- | test/dialect/postgresql/test_compiler.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py index c707137a8..2223b0a76 100644 --- a/test/dialect/postgresql/test_compiler.py +++ b/test/dialect/postgresql/test_compiler.py @@ -212,7 +212,10 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): t1 = Table( "sometable", MetaData(), - Column("somecolumn", Enum("x", "y", "z", native_enum=False)), + Column( + "somecolumn", + Enum("x", "y", "z", native_enum=False, create_constraint=True), + ), ) self.assert_compile( schema.CreateTable(t1), |