Opened 5 years ago
Closed 5 years ago
#30661 closed New feature (fixed)
Add support for SmallAutoField.
Reported by: | Nick Pope | Owned by: | Nick Pope |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | autofield, smallautofield, smallintegerfield |
Cc: | 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
We have AutoField
and BigAutoField
that mirror IntegerField
and BigIntegerField
, but there is no SmallAutoField
for SmallIntegerField
.
It can be useful to have an auto-incrementing 16-bit integer field for infrequently updated tables that contain a list of choices, e.g. countries, for systems where limited disk space/memory is available.
(In part this was also a test for the changes in #29979.)
Change History (6)
comment:1 by , 5 years ago
Has patch: | set |
---|
comment:2 by , 5 years ago
Wondering if this is sufficiently useful to be part of core? (It seems a bit niche.) Seems like the sort of thing we often recommend putting in the third-party field (and package).
comment:3 by , 5 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:5 by , 5 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
PR