simone/django-compositekey — Issue #6: Initial syncdb fails on oracle 10g (10.2)
Author: ffalcinelli
Created: 2011-11-16 09:34:04+00:00
State: open

When creating the db schema, the django command tries to create a column with an invalid identifier ("ID") as below:

(django1.4)[fabio@latitude testprj]$ python manage.py syncdb
activate_fk_monkey_patch
activate_get_from_clause_monkey_patch
activate_delete_monkey_patch
activate_make_atom_monkey_patch
activate_get_fields_with_model_monkey_patch
activate_insert_query_monkey_patch
activate_add_fields_monkey_patch
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table sample_book
Traceback (most recent call last):
File "manage.py", line 9, in
execute_from_command_line(sys.argv)
File "/env/django1.4/lib/python2.7/site-packages/django/core/management/__init__.py", line 422, in execute_from_command_line
utility.execute()
File "/env/django1.4/lib/python2.7/site-packages/django/core/management/__init__.py", line 361, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/env/django1.4/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/env/django1.4/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/env/django1.4/lib/python2.7/site-packages/django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/env/django1.4/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 101, in handle_noargs
cursor.execute(statement)
File "/env/django1.4/lib/python2.7/site-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
File "/env/django1.4/lib/python2.7/site-packages/django/db/backends/oracle/base.py", line 654, in execute
return self.cursor.execute(query, self._param_generator(params))
django.db.utils.DatabaseError: ORA-00904: "ID": invalid identifier

(django1.4)[fabio@latitude testprj]$