From 5ca82e710e2f92b8c5114492205c8764918407d3 Mon Sep 17 00:00:00 2001 From: Marc Tamlyn Date: Sun, 21 Dec 2014 14:36:37 +0000 Subject: Fixed #24033 -- Use interval type on Oracle. Use INTERVAL DAY(9) TO SECOND(6) for Durationfield on Oracle rather than storing as a NUMBER(19) of microseconds. There are issues with cx_Oracle which require some extra data manipulation in the database backend when constructing queries, but it handles the conversion back to timedelta objects cleanly. Thanks to Shai for the review. --- docs/ref/models/fields.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/ref') diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 203241ae5f..5eabf84cad 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -551,7 +551,8 @@ The default form widget for this field is a :class:`~django.forms.TextInput`. A field for storing periods of time - modeled in Python by :class:`~python:datetime.timedelta`. When used on PostgreSQL, the data type -used is an ``interval``, otherwise a ``bigint`` of microseconds is used. +used is an ``interval`` and on Oracle the data type is ``INTERVAL DAY(9) TO +SECOND(6)``. Otherwise a ``bigint`` of microseconds is used. .. note:: -- cgit v1.3