summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-01-28 08:19:47 -0500
committerGitHub <noreply@github.com>2017-01-28 08:19:47 -0500
commit0de0699d94ccd078c83eadef296a0d9ccd65a62f (patch)
tree920b38dbe28f0110743a799078e648735ff3e1cf /django
parenta6755b29e9335723c9347a36d4000a3157b05441 (diff)
Fixed #27788 -- Dropped support for Oracle < 12.1.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/gis/db/backends/oracle/operations.py14
-rw-r--r--django/db/backends/base/features.py15
-rw-r--r--django/db/backends/oracle/features.py15
3 files changed, 10 insertions, 34 deletions
diff --git a/django/contrib/gis/db/backends/oracle/operations.py b/django/contrib/gis/db/backends/oracle/operations.py
index 6fc4fb69aa..277a6a4b56 100644
--- a/django/contrib/gis/db/backends/oracle/operations.py
+++ b/django/contrib/gis/db/backends/oracle/operations.py
@@ -17,7 +17,6 @@ from django.contrib.gis.db.models import aggregates
from django.contrib.gis.geometry.backend import Geometry
from django.contrib.gis.measure import Distance
from django.db.backends.oracle.operations import DatabaseOperations
-from django.utils.functional import cached_property
DEFAULT_TOLERANCE = '0.05'
@@ -132,15 +131,10 @@ class OracleOperations(BaseSpatialOperations, DatabaseOperations):
truncate_params = {'relate': None}
- @cached_property
- def unsupported_functions(self):
- unsupported = {
- 'AsGeoJSON', 'AsKML', 'AsSVG', 'Envelope', 'ForceRHR', 'GeoHash',
- 'MakeValid', 'MemSize', 'Scale', 'SnapToGrid', 'Translate',
- }
- if self.connection.oracle_full_version < '12.1.0.2':
- unsupported.add('BoundingCircle')
- return unsupported
+ unsupported_functions = {
+ 'AsGeoJSON', 'AsKML', 'AsSVG', 'Envelope', 'ForceRHR', 'GeoHash',
+ 'MakeValid', 'MemSize', 'Scale', 'SnapToGrid', 'Translate',
+ }
def geo_quote_name(self, name):
return super().geo_quote_name(name).upper()
diff --git a/django/db/backends/base/features.py b/django/db/backends/base/features.py
index 8f9fbdcfea..d108dc1320 100644
--- a/django/db/backends/base/features.py
+++ b/django/db/backends/base/features.py
@@ -253,18 +253,15 @@ class BaseDatabaseFeatures:
except NotImplementedError:
return False
- def introspected_boolean_field_type(self, field=None, created_separately=False):
+ def introspected_boolean_field_type(self, field=None):
"""
What is the type returned when the backend introspects a BooleanField?
- The optional arguments may be used to give further details of the field to be
- introspected; in particular, they are provided by Django's test suite:
- field -- the field definition
- created_separately -- True if the field was added via a SchemaEditor's AddField,
- False if the field was created with the model
+ The `field` argument may be used to give further details of the field
+ to be introspected.
- Note that return value from this function is compared by tests against actual
- introspection results; it should provide expectations, not run an introspection
- itself.
+ The return value from this function is compared by tests against actual
+ introspection results; it should provide expectations, not run an
+ introspection itself.
"""
if self.can_introspect_null and field and field.null:
return 'NullBooleanField'
diff --git a/django/db/backends/oracle/features.py b/django/db/backends/oracle/features.py
index 0e85f267f2..3e72a5c29d 100644
--- a/django/db/backends/oracle/features.py
+++ b/django/db/backends/oracle/features.py
@@ -35,18 +35,3 @@ class DatabaseFeatures(BaseDatabaseFeatures):
# Oracle doesn't ignore quoted identifiers case but the current backend
# does by uppercasing all identifiers.
ignores_table_name_case = True
-
- def introspected_boolean_field_type(self, field=None, created_separately=False):
- """
- Some versions of Oracle -- we've seen this on 11.2.0.1 and suspect
- it goes back -- have a weird bug where, when an integer column is
- added to an existing table with a default, its precision is later
- reported on introspection as 0, regardless of the real precision.
- For Django introspection, this means that such columns are reported
- as IntegerField even if they are really BigIntegerField or BooleanField.
-
- The bug is solved in Oracle 11.2.0.2 and up.
- """
- if self.connection.oracle_full_version < '11.2.0.2' and field and field.has_default() and created_separately:
- return 'IntegerField'
- return super().introspected_boolean_field_type(field, created_separately)