Opened 4 years ago

Last modified 2 years ago

#32234 closed Cleanup/optimization

inspectdb should inform about composite keys. — at Version 3

Reported by: Damien Owned by: Damien
Component: Core (Management commands) Version: 3.1
Severity: Normal Keywords:
Cc: Ad Timmering Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Damien)

Since django does not support multiple multiple-column primary keys, there should be a warning that the inspectdb result does not match exactly the database

PR

Change History (3)

comment:1 by Mariusz Felisiak, 4 years ago

Easy pickings: unset
Has patch: set
Needs tests: set
Owner: changed from nobody to Damien
Patch needs improvement: set
Status: newassigned
Triage Stage: UnreviewedAccepted

inspectdb is meant as a shortcut, not as definitive model generation. I would rather add a comment to the field's notes like we do in other cases. Raising a warning can be really annoying when you try to inspect a legacy database.

comment:2 by Mariusz Felisiak, 4 years ago

Component: Database layer (models, ORM)Core (Management commands)
Summary: Add warning when multiple-column primary keys are found when using inspectdbinspectdb should inform about composite keys.
Type: New featureCleanup/optimization

comment:3 by Damien, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top