diff options
author | Kevin Kubasik <kevin@kubasik.net> | 2009-09-08 17:36:43 +0000 |
---|---|---|
committer | Kevin Kubasik <kevin@kubasik.net> | 2009-09-08 17:36:43 +0000 |
commit | 3de5792e13d777c2beedea11bcc308f6c9df4ff9 (patch) | |
tree | 88a433f78b5f77ab1964162594d25f6a59e7a5d9 /django/db/backends/oracle/introspection.py | |
parent | e2d14c075a51eb1f0b832765df8723d82f0afac4 (diff) | |
parent | bb9cc01b132dbde2461191dbb1035eaae4885051 (diff) | |
download | django-soc2009/test-improvements.tar.gz |
[gsoc2009-testing] Massive merge update to trunk. This is to prep for uploadarchive/soc2009/test-improvementssoc2009/test-improvements
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/test-improvements@11480 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/oracle/introspection.py')
-rw-r--r-- | django/db/backends/oracle/introspection.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/django/db/backends/oracle/introspection.py b/django/db/backends/oracle/introspection.py index 543e84a8f3..0b4f61a360 100644 --- a/django/db/backends/oracle/introspection.py +++ b/django/db/backends/oracle/introspection.py @@ -26,6 +26,14 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): except AttributeError: pass + def get_field_type(self, data_type, description): + # If it's a NUMBER with scale == 0, consider it an IntegerField + if data_type == cx_Oracle.NUMBER and description[5] == 0: + return 'IntegerField' + else: + return super(DatabaseIntrospection, self).get_field_type( + data_type, description) + def get_table_list(self, cursor): "Returns a list of table names in the current database." cursor.execute("SELECT TABLE_NAME FROM USER_TABLES") |