#32674: DEFAULT_AUTO_FIELD should also be used for ManyToMany table primary keys
-------------------------------------+-------------------------------------
Reporter: Cristiano | Owner: nobody
Coelho |
Type: | Status: new
Uncategorized |
Component: | Version: 3.2
Uncategorized | Keywords: DEFAULT_AUTO_FIELD
Severity: Normal | AutoField BigAutoField
Triage Stage: | ManyToManyField
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
Django 3.2 introduced `DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'`.
However, if we set it to BigAutoField, I would expect that the
intermediary table created for ManyToMany relationships also honor this
value.
Right now, we end up with tables that have FKs as bigint, but their own PK
as integer. This may not be a direct bug, but will cause issues for sure.
Ideally, ManyToManyField should have an easy way to configure its PK
without having to implement the `through` model.
--
Ticket URL: <https://code.djangoproject.com/ticket/32674>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/055.1c261ee8e0ce08549a835ac9e606d17b%40djangoproject.com.