#31630 closed Cleanup/optimization (fixed)
Replace DatabaseFeatures.introspected_*_field_type attributes with a single attribute.
Reported by: | Tim Graham | Owned by: | Hasan Ramezani |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
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
The current database features to specify the field that a database introspects are:
- introspected_big_auto_field_type
- introspected_small_auto_field_type
- introspected_boolean_field_type
CockroachDB could also use:
- introspected_integer_field_type (CockroachDB introspects IntegerField as BigIntegerField)
- introspected_char_field_type (CockroachDB introspects CharField as TextField)
Rather than adding those attributes, I think it could be more useful to add DatabaseFeatures.introspected_field_type
which would be a dictionary mapping each field class to the type it's introspected as.
Change History (8)
comment:1 by , 4 years ago
Summary: | Replace DatabaseFeatures.introspected_*_field_type attributes with a single attribute → Replace DatabaseFeatures.introspected_*_field_type attributes with a single attribute. |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 4 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 4 years ago
Patch needs improvement: | set |
---|
As noted on the PR, I'm doing a little more work before marking this as ready for checkin.
comment:4 by , 4 years ago
Patch needs improvement: | unset |
---|
I added two commits to the PR which finishes the work.
comment:5 by , 4 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
PR