diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2017-09-05 11:17:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-05 11:17:06 +0200 |
| commit | 179b247e07592a11708fa0ffdd23dc3f9af042fb (patch) | |
| tree | ea69c0802fb6a134cb7e99abb677de65c3059f79 | |
| parent | 3ba4de59a2ac3bcd5f33acb6442710b41c9fdbe6 (diff) | |
Removed useless condition from Oracle's NullBooleanField's check constraint.
NULL cannot be compare with standard operators on Oracle, it works only
with IS NULL and IS NOT NULL operators. Therefore 'OR ... IS NULL'
condition in NullBooleanField's check constraint is redundant.
Nullability is checked in a separate constraint.
| -rw-r--r-- | django/db/backends/oracle/base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index b13bab1798..ae77de57d0 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -111,7 +111,7 @@ class DatabaseWrapper(BaseDatabaseWrapper): } data_type_check_constraints = { 'BooleanField': '%(qn_column)s IN (0,1)', - 'NullBooleanField': '(%(qn_column)s IN (0,1)) OR (%(qn_column)s IS NULL)', + 'NullBooleanField': '%(qn_column)s IN (0,1)', 'PositiveIntegerField': '%(qn_column)s >= 0', 'PositiveSmallIntegerField': '%(qn_column)s >= 0', } |
