#35957: Allow AutoFields in composite primary keys
-------------------------------------+-------------------------------------
     Reporter:  Csirmaz Bendegúz     |                    Owner:  (none)
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Csirmaz Bendegúz):

 I think it aligns with what we discussed on the forum?

 We keep the ''one AutoField per model'' restriction we currently have, but
 we'll allow `AutoField` to be part of a composite primary key.

 I don't think we should allow multiple `AutoField`s, since only Postgres
 would support that and there's no strong use case for having multiple
 IDENTITY columns in a table. If consensus on this changes, then #8576 can
 be re-opened any time as it doesn't conflict with this ticket.

 While the ''multiple AutoFields'' topic is contentious, everyone seems to
 agree that ''AutoField in composite primary keys'' should be added.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35957#comment:4>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070193901e08e9-85e74814-e80d-4a63-b72c-0a4e4320c51f-000000%40eu-central-1.amazonses.com.

Reply via email to