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/test_sqlite.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/test_sqlite.py')
| -rw-r--r-- | test/dialect/test_sqlite.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py index 04a15d587..fabbfa4a4 100644 --- a/test/dialect/test_sqlite.py +++ b/test/dialect/test_sqlite.py @@ -1065,7 +1065,13 @@ class SQLTest(fixtures.TestBase, AssertsCompiledSQL): def test_column_defaults_ddl(self): t = Table( - "t", MetaData(), Column("x", Boolean, server_default=sql.false()) + "t", + MetaData(), + Column( + "x", + Boolean(create_constraint=True), + server_default=sql.false(), + ), ) self.assert_compile( |
