summaryrefslogtreecommitdiff
path: root/django/db/backends
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-13 21:28:09 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-14 17:50:04 +0100
commitd992f4e3c29a81c956d3d616f0bc19701431b26e (patch)
tree3eebb321ef640126a8a1ad6c9f6273a73dc57463 /django/db/backends
parent06eec3197009b88e3a633128bbcbd76eea0b46ff (diff)
Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.
Diffstat (limited to 'django/db/backends')
-rw-r--r--django/db/backends/mysql/base.py1
-rw-r--r--django/db/backends/mysql/operations.py2
-rw-r--r--django/db/backends/oracle/base.py2
-rw-r--r--django/db/backends/oracle/operations.py2
-rw-r--r--django/db/backends/oracle/utils.py1
-rw-r--r--django/db/backends/postgresql/base.py1
-rw-r--r--django/db/backends/sqlite3/base.py1
-rw-r--r--django/db/backends/sqlite3/operations.py2
8 files changed, 3 insertions, 9 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index f57ec283fc..470271c376 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -119,7 +119,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
'IPAddressField': 'char(15)',
'GenericIPAddressField': 'char(39)',
'JSONField': 'json',
- 'NullBooleanField': 'bool',
'OneToOneField': 'integer',
'PositiveBigIntegerField': 'bigint UNSIGNED',
'PositiveIntegerField': 'integer UNSIGNED',
diff --git a/django/db/backends/mysql/operations.py b/django/db/backends/mysql/operations.py
index 5d2a981226..e43c121b4d 100644
--- a/django/db/backends/mysql/operations.py
+++ b/django/db/backends/mysql/operations.py
@@ -291,7 +291,7 @@ class DatabaseOperations(BaseDatabaseOperations):
def get_db_converters(self, expression):
converters = super().get_db_converters(expression)
internal_type = expression.output_field.get_internal_type()
- if internal_type in ['BooleanField', 'NullBooleanField']:
+ if internal_type == 'BooleanField':
converters.append(self.convert_booleanfield_value)
elif internal_type == 'DateTimeField':
if settings.USE_TZ:
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index d1650e7927..966eb4b6f4 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -127,7 +127,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
'BigIntegerField': 'NUMBER(19)',
'IPAddressField': 'VARCHAR2(15)',
'GenericIPAddressField': 'VARCHAR2(39)',
- 'NullBooleanField': 'NUMBER(1)',
'OneToOneField': 'NUMBER(11)',
'PositiveBigIntegerField': 'NUMBER(19)',
'PositiveIntegerField': 'NUMBER(11)',
@@ -143,7 +142,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
data_type_check_constraints = {
'BooleanField': '%(qn_column)s IN (0,1)',
'JSONField': '%(qn_column)s IS JSON',
- 'NullBooleanField': '%(qn_column)s IN (0,1)',
'PositiveBigIntegerField': '%(qn_column)s >= 0',
'PositiveIntegerField': '%(qn_column)s >= 0',
'PositiveSmallIntegerField': '%(qn_column)s >= 0',
diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py
index b829d2bd9b..964edc4549 100644
--- a/django/db/backends/oracle/operations.py
+++ b/django/db/backends/oracle/operations.py
@@ -182,7 +182,7 @@ END;
converters.append(self.convert_textfield_value)
elif internal_type == 'BinaryField':
converters.append(self.convert_binaryfield_value)
- elif internal_type in ['BooleanField', 'NullBooleanField']:
+ elif internal_type == 'BooleanField':
converters.append(self.convert_booleanfield_value)
elif internal_type == 'DateTimeField':
if settings.USE_TZ:
diff --git a/django/db/backends/oracle/utils.py b/django/db/backends/oracle/utils.py
index 5665079aa2..bbfd7f6a39 100644
--- a/django/db/backends/oracle/utils.py
+++ b/django/db/backends/oracle/utils.py
@@ -73,7 +73,6 @@ class BulkInsertMapper:
'DurationField': INTERVAL,
'FloatField': NUMBER,
'IntegerField': NUMBER,
- 'NullBooleanField': NUMBER,
'PositiveBigIntegerField': NUMBER,
'PositiveIntegerField': NUMBER,
'PositiveSmallIntegerField': NUMBER,
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py
index c752b5dba4..9eac005dd1 100644
--- a/django/db/backends/postgresql/base.py
+++ b/django/db/backends/postgresql/base.py
@@ -87,7 +87,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
'IPAddressField': 'inet',
'GenericIPAddressField': 'inet',
'JSONField': 'jsonb',
- 'NullBooleanField': 'boolean',
'OneToOneField': 'integer',
'PositiveBigIntegerField': 'bigint',
'PositiveIntegerField': 'integer',
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index 9ce3208960..f8e1def982 100644
--- a/django/db/backends/sqlite3/base.py
+++ b/django/db/backends/sqlite3/base.py
@@ -104,7 +104,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
'IPAddressField': 'char(15)',
'GenericIPAddressField': 'char(39)',
'JSONField': 'text',
- 'NullBooleanField': 'bool',
'OneToOneField': 'integer',
'PositiveBigIntegerField': 'bigint unsigned',
'PositiveIntegerField': 'integer unsigned',
diff --git a/django/db/backends/sqlite3/operations.py b/django/db/backends/sqlite3/operations.py
index 71ef000c93..faf96a1b97 100644
--- a/django/db/backends/sqlite3/operations.py
+++ b/django/db/backends/sqlite3/operations.py
@@ -277,7 +277,7 @@ class DatabaseOperations(BaseDatabaseOperations):
converters.append(self.get_decimalfield_converter(expression))
elif internal_type == 'UUIDField':
converters.append(self.convert_uuidfield_value)
- elif internal_type in ('NullBooleanField', 'BooleanField'):
+ elif internal_type == 'BooleanField':
converters.append(self.convert_booleanfield_value)
return converters