Combined/composite primary key or composite unique field?

1,939 views
Skip to first unread message

Hugo Heyman

unread,
Jul 20, 2012, 8:14:44 AM7/20/12
to peewe...@googlegroups.com
Hi

I'm wondering if it is possible to make a composite primary key, or maybe composite unique fields? I could not find anything on this topic in this mailing list or in the docs.

If not is there some other way around to achieve the same result?

Thanks!

/Hugo

Charles

unread,
Jul 20, 2012, 10:16:47 AM7/20/12
to peewe...@googlegroups.com
Unfortunately, there aren't at this time but its something I'm interested in adding.

Charlie

Hugo Heyman

unread,
Jul 20, 2012, 10:35:43 AM7/20/12
to peewe...@googlegroups.com
Ok, thanks for a fast reply.

I looked at the django ORM, and apparently it does not support composite primary key either, however they have unique-together for similar use. Maybe that's something to consider adding.

/Hugo

Charles

unread,
Aug 13, 2012, 3:37:50 PM8/13/12
to peewe...@googlegroups.com
Just thought I'd let you know it is now possible to add multi-column indexes (including w/unique constraint):


There is a blurb on specifying indexes there.

Hugo Heyman

unread,
Aug 14, 2012, 3:36:02 AM8/14/12
to peewe...@googlegroups.com
Cool!

I'll make sure to try this out soon.

/Hugo
Reply all
Reply to author
Forward
0 new messages