Opened 6 years ago
Closed 6 years ago
#30123 closed Cleanup/optimization (fixed)
Remove support for tuples returned from DatabaseIntrospection.get_field_type().
Reported by: | Nick Pope | Owned by: | Nick Pope |
---|---|---|---|
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
Following on from #30115, there are two places where DatabaseIntrospection.get_field_type()
returns a tuple pair of the string name of the field type and a dictionary of extra parameters for the field type:
- For the SQLite backend where a field has a size, e.g.
varchar(40)
. - For the PostGIS backend where we need to handle
geography
data types.
The SQLite case led to an obscure bug that has been addressed for #30115 by removing it as it turned out that the max_length
value was already handled.
This leaves only the PostGIS case which this ticket proposes to replace with an alternative solution, as well as the removal of workarounds in the test suite that handle tuples returned from DatabaseIntrospection.get_field_type()
.
Change History (5)
comment:1 by , 6 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 6 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
PR
Marked as accepted based on comments in original PR from which this is derived.