#12529: manage.py syncdb doesn't check tables by using mangled names with Oracle
backend
---------------------------+------------------------------------------------
 Reporter:  jtiai          |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  SVN       
 Keywords:  syncdb oracle  |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 With Oracle syncdb doesn't use mangled names when comparing tablenames to
 ones existing in database thus trying to create tables that already
 exists. This leads to

 {{{
 Creating table ssp_service_category_translation
 Traceback (most recent call last):
   File "./manage.py", line 19, in <module>
     execute_manager(settings)
   File "../../django-trunk/django/core/management/__init__.py", line 439,
 in execute_manager
     utility.execute()
   File "../../django-trunk/django/core/management/__init__.py", line 380,
 in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "../../django-trunk/django/core/management/base.py", line 195, in
 run_from_argv
     self.execute(*args, **options.__dict__)
   File "../../django-trunk/django/core/management/base.py", line 222, in
 execute
     output = self.handle(*args, **options)
   File "../../django-trunk/django/core/management/base.py", line 351, in
 handle
     return self.handle_noargs(**options)
   File "../../django-trunk/django/core/management/commands/syncdb.py",
 line 91, in handle_noargs
     cursor.execute(statement)
   File "../../django-trunk/django/db/backends/util.py", line 19, in
 execute
     return self.cursor.execute(sql, params)
   File "../../django-trunk/django/db/backends/oracle/base.py", line 487,
 in execute
     raise e
 cx_Oracle.DatabaseError: ORA-00955: name is already used by an existing
 object
 }}}

 Root cause for this is using
 connection.introspection.table_name_converter() in syncdb main loop which
 in case of oracle returns just lowercase name and not properly mangled
 name that would match existing table in database.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12529>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en.


Reply via email to