diff options
| author | Ian Kelly <ian.g.kelly@gmail.com> | 2008-10-13 19:41:48 +0000 |
|---|---|---|
| committer | Ian Kelly <ian.g.kelly@gmail.com> | 2008-10-13 19:41:48 +0000 |
| commit | 4537f33487d265c78827e2f3d3b69f0074a7fda1 (patch) | |
| tree | 8048f8c173effb0fee4b5b393cfa15f6de49dd55 | |
| parent | 743019f8fde33af4002b6bed4342edbd466172e7 (diff) | |
[1.0.X] Fixed Oracle introspection mapping of DATE columns, and added an
entry for Oracle 10g native float columns.
Backport of r9231 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/backends/oracle/introspection.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/django/db/backends/oracle/introspection.py b/django/db/backends/oracle/introspection.py index 890e30a694..59f9779390 100644 --- a/django/db/backends/oracle/introspection.py +++ b/django/db/backends/oracle/introspection.py @@ -8,7 +8,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type objects to Django Field types. data_types_reverse = { cx_Oracle.CLOB: 'TextField', - cx_Oracle.DATETIME: 'DateTimeField', + cx_Oracle.DATETIME: 'DateField', cx_Oracle.FIXED_CHAR: 'CharField', cx_Oracle.NCLOB: 'TextField', cx_Oracle.NUMBER: 'DecimalField', @@ -16,6 +16,11 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): cx_Oracle.TIMESTAMP: 'DateTimeField', } + try: + data_types_reverse[cx_Oracle.NATIVE_FLOAT] = 'FloatField' + except AttributeError: + pass + def get_table_list(self, cursor): "Returns a list of table names in the current database." cursor.execute("SELECT TABLE_NAME FROM USER_TABLES") |
