summaryrefslogtreecommitdiff
path: root/django/db/backends/__init__.py
diff options
context:
space:
mode:
authorMatt Boersma <matt@sprout.org>2009-08-21 21:42:39 +0000
committerMatt Boersma <matt@sprout.org>2009-08-21 21:42:39 +0000
commite263cc0dc53577d525aad0546fc1bd5939dc2e0b (patch)
treef5ca5323383692db4a8585ab840eae56512d5038 /django/db/backends/__init__.py
parente0ce9d76e1a4b74db93c106f8267339af5f9d73e (diff)
Fixed #11049: introspection on Oracle now identifies IntegerFields correctly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/__init__.py')
-rw-r--r--django/db/backends/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 579bf80aaf..9a1fe30925 100644
--- a/django/db/backends/__init__.py
+++ b/django/db/backends/__init__.py
@@ -470,6 +470,14 @@ class BaseDatabaseIntrospection(object):
def __init__(self, connection):
self.connection = connection
+ def get_field_type(self, data_type, description):
+ """Hook for a database backend to use the cursor description to
+ match a Django field type to a database column.
+
+ For Oracle, the column data_type on its own is insufficient to
+ distinguish between a FloatField and IntegerField, for example."""
+ return self.data_types_reverse[data_type]
+
def table_name_converter(self, name):
"""Apply a conversion to the name for the purposes of comparison.
@@ -560,4 +568,3 @@ class BaseDatabaseValidation(object):
def validate_field(self, errors, opts, f):
"By default, there is no backend-specific validation"
pass
-