#373: Add support for multiple-column primary keys
-------------------------------------+-------------------------------------
     Reporter:  jacob                |                    Owner:  koniiiik
         Type:  New feature          |                   Status:  assigned
    Component:  Database layer       |                  Version:
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  database             |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by jeremyt):

 I think the primary_key option in the Meta makes since from the ease of
 use/flow prospective. I'm not saying that we should remove the option from
 the field either but it should only be specified in one space. Just like a
 CREATE TABLE statement really. If I have a primary key of a single column,
 I can specify it on that one column directly but if I have multiple, I
 place the primary key explanation as a constraint and not a column/field
 itself.

 In the end, the model would be the same except the user doesn't have to
 manually declare the composite field(they still can if they want to
 though), but system would generate the composite field for them and make
 it the pk. But if the primary_key is missing everywhere, it continues to
 create the AutoField pk just as it does today.

 Does this disagree with the current schema?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/373#comment:114>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to