How do I use 'primary_key=True' with Oracle 10g R2 to create a primary key on a custom field instead of on the default ID field?
'python manage.py sqlall <app_name>' shows that Django's SQL generation correctly assigns the PRIMARY KEY attribute to the 'primary_key=True' field that I list in my class definition. But when I issue 'python manage.py syncdb', Oracle ignores the Django- generated SQL and instead creates a primary key field named 'ID'. My workaround is to issue 'python manage.py sqlall <app_name>' and to run the Django-generated SQL script within my Oracle SQL editor. Using the Django-generated SQL script, the table is created as designed in the Django model and with the 'primary_key=True' field correctly inserted as the table's primary key. No ID field then appears in the table. Thanks! Mike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---