#19884: Inspectdb on Oracle doesn't produce correct field types
-------------------------------------+-------------------------------------
Reporter: Anssi Kääriäinen | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => fixed
Old description:
> 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.
New description:
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 (**cannot be distinguished**)
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.
--
Comment:
Both `DateTimeField` and `TimeField` use exactly the same datatype i.e.
`TIMESTAMP`, they cannot be distinguished in introspection. IMO, we can
treat this ticket as fixed.
--
Ticket URL: <https://code.djangoproject.com/ticket/19884#comment:14>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070181f8f651fc-690df872-73e6-4d7e-ac8d-9879a1e5a740-000000%40eu-central-1.amazonses.com.