﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13565	Using syncdb with Oracle using synonyms causes ORA-00955.	ash@…	nobody	"When working with legacy databases and Django, Oracle has a nice feature to alias a table to match what Django thinks it should be. (Which is absolutely needed when the table you're referencing is in another user's schema.)

Unfortunately, the table creation SQL doesn't detect the alias, and sees the table as missing. When it tries to create it, you get a ORA-00955 error. (Name is already used by an existing object).
{{{
Creating table users_foo
Traceback (most recent call last):
  File ""./manage.py"", line 11, in <module>
    execute_manager(settings)
  File ""/usr/local/lib/python2.6/dist-packages/Django-1.2-py2.6.egg/django/core/management/__init__.py"", line 438, in execute_manager
    utility.execute()
  File ""/usr/local/lib/python2.6/dist-packages/Django-1.2-py2.6.egg/django/core/management/__init__.py"", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""/usr/local/lib/python2.6/dist-packages/Django-1.2-py2.6.egg/django/core/management/base.py"", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""/usr/local/lib/python2.6/dist-packages/Django-1.2-py2.6.egg/django/core/management/base.py"", line 218, in execute
    output = self.handle(*args, **options)
  File ""/usr/local/lib/python2.6/dist-packages/Django-1.2-py2.6.egg/django/core/management/base.py"", line 347, in handle
    return self.handle_noargs(**options)
  File ""/usr/local/lib/python2.6/dist-packages/Django-1.2-py2.6.egg/django/core/management/commands/syncdb.py"", line 95, in handle_noargs
    cursor.execute(statement)
  File ""/usr/local/lib/python2.6/dist-packages/Django-1.2-py2.6.egg/django/db/backends/util.py"", line 15, in execute
    return self.cursor.execute(sql, params)
  File ""/usr/local/lib/python2.6/dist-packages/Django-1.2-py2.6.egg/django/db/backends/oracle/base.py"", line 507, in execute
    return self.cursor.execute(query, self._param_generator(params))
django.db.utils.DatabaseError: ORA-00955: name is already used by an existing object
}}}"	Bug	closed	Database layer (models, ORM)	1.2	Normal	wontfix	oracle	Erin Kelly Matt Boersma	Design decision needed	1	0	1	0	0	0
