world_domination_kites wrote:
> -------------------------------------------------------------------------------
> But then, alas:
> -------------------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "c:\Python23\Lib\site-packages\Django-0.95-py2.3.egg\django\bin\django-admin.py",
> line 5, in ?
> management.execute_from_command_line()
> File
> "c:\python23\lib\site-packages\Django-0.95-py2.3.egg\django\core\management.py",
> line 1224, in execute_from_command_line
> for line in action_mapping[action]():
> File
> "c:\python23\lib\site-packages\Django-0.95-py2.3.egg\django\core\management.py",
> line 745, in inspectdb
> field_type = introspection_module.DATA_TYPES_REVERSE[row[1]]
> IndexError: string index out of range
> -------------------------------------------------------------------------------
I think django.db.backends.oracle.introspection is broken/incomplete.
Compare its get_table_description()
def get_table_description(cursor, table_name):
return table_name
With MySQL's (where I've used inspectdb successfully):
def get_table_description(cursor, table_name):
"Returns a description of the table, with the DB-API
cursor.description interface."
cursor.execute("SELECT * FROM %s LIMIT 1" % quote_name(table_name))
return cursor.description
This makes me think no one has ever tried 'inspectdb' on Oracle. Note
that get_relations and get_indexes both throw NotImpmementedError, too.
You could try implementing those three functions, using one of the
other backends as a starting point, but you'll need to be fairly
familiar with Oracle to get through it, me thinks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---