Opened 12 years ago
Last modified 2 years ago
#19884 closed Bug
Inspectdb on Oracle doesn't produce correct field types — at Version 5
Reported by: | Anssi Kääriäinen | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.9 |
Severity: | Normal | Keywords: | |
Cc: | felisiak.mariusz@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The test inspectdb.test_field_types() has multiple errors, at least:
- CharField lengths not correctly inspected (returns double the length of generated field)
FloatField not correctly inspected (returns DecimalField with max_digits=-127)- DateTimeField is inspected as TimeField
Getting all these to work correctly will be somewhat hard. So, the suggested short-term fix is to just mark the test as expectedFailure on Oracle. Inspectdb isn't high-priority as the output should be hand-edited in any case.
Change History (5)
comment:1 by , 12 years ago
comment:3 by , 11 years ago
I just posted PR 2225 which breaks inspectdb.test_field_types()
in two: a test_number_field_types()
which passes (the PR includes a fix to the FloatField issue), and test_field_types()
which does all the rest and is still marked expectedFailure; most of the fields tested there are CharFields under Oracle, so fixing makes little sense indeed.
I would have committed this immediately, except that the breaking of the test method includes some not-entirely-trivial factoring-out of code, and I'd like a second eye on that.
comment:5 by , 11 years ago
Description: | modified (diff) |
---|
In f565c6f9994b2559a5164dc709a926eac7ebd5fe: