#31846: inspectdb doesn't handle tables with "id" field and without primary key
-------------------------------------+-------------------------------------
Reporter: François Poulain | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 3.0
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Adam (Chainz) Johnson):
This is the old composite keys feature.
Without implementing composite PK's in the Django ORM, I guess we could
add the proposed check to inspectdb. We can remap 'id' to 'id_field' (or
'id_field_2' if 'id_field' exists, etc.) if it's not the only field in the
PK. The proposed patch seems like a good start.
--
Ticket URL: <https://code.djangoproject.com/ticket/31846#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 on the web visit
https://groups.google.com/d/msgid/django-updates/066.8b7c3d0196b6e42ebc9aaed85ec3b18e%40djangoproject.com.