johnpaulett/django-durationfield — pull request #16 by blueyed (2014-03-12 20:27:39+00:00)
Title: Return an existing Django type from get_internal_type

Please consider this pull request for discussion only.

btw: the tests passed before and after, although they should have failed before (for Django 1.7). I've thought that just a call to `save()` should have triggered an error.
Maybe it's related to sqlite being used, or because of TestModels being involved?!
(I could not get my hands on the durationfieldtest.db, even after commenting out "Destroying test database for alias ..." part from Django.

From the commit:
This is used in Django 1.7 migrations to derive the correct database
type from.

I cannot see, why "DurationField" should be returned here (added in
892b6e9).

This leaves `db_type` as-is, since it's used with older Django versions
and South probably.

Fixes https://github.com/johnpaulett/django-durationfield/issues/15.
Related Django ticket: https://code.djangoproject.com/ticket/22260