Re: Prevent setting a primary key (compound uniqueness)
Am 17.10.2007 um 14:43 schrieb Erik Stein: > Is there a way to tell django not to set a primary key on a table > (and then doing it with custom sql)? Answering myself: To make django happy a define primary_key=True for one of the fields. I added a custom sql file for the model and drop the wrong primary key there. ALTER TABLE keyword_index DROP PRIMARY KEY; This is for MySQL. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Prevent setting a primary key (compound uniqueness)
> Is there a way to tell django not to set a primary key on a table > (and then doing it with custom sql)? Hi, why can't you drop the created primary key in you custom sql (myapp/sql/mymodel.sql) , and then create your new combined index? Thomas --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---