Re: Prevent setting a primary key (compound uniqueness)

2007-10-17 Thread Erik Stein
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

Re: Prevent setting a primary key (compound uniqueness)

2007-10-17 Thread Thomas Guettler
> 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 --~--~-~--~~~---~

Prevent setting a primary key (compound uniqueness)

2007-10-17 Thread Erik Stein
I know the ticket [1] and the FAQ [2] and the wiki page [3] concerning "Multi-Column Primary Key support". My (legacy) table with ~25000 rows is a m2m-Model, which means that uniqueness must be calculated on the whole row. In other words, no single column can have a constraint on uniquenes