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 )
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
Change History (3)
comment:1 by , 4 years ago
Easy pickings: | unset |
---|---|
Has patch: | set |
Needs tests: | set |
Owner: | changed from | to
Patch needs improvement: | set |
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 4 years ago
Component: | Database layer (models, ORM) → Core (Management commands) |
---|---|
Summary: | Add warning when multiple-column primary keys are found when using inspectdb → inspectdb should inform about composite keys. |
Type: | New feature → Cleanup/optimization |
comment:3 by , 4 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
inspectdb
is meant as a shortcut, not as definitive model generation. I would rather add a comment to the field'snotes
like we do in other cases. Raising a warning can be really annoying when you try to inspect a legacy database.