﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26053	makemigrations generates a wrong type for a DurationField column on postgresql	Benjelloun Mohamed Ayoub	nobody	"'''Dependencies''':
- Django version : 1.9.1
- PostgreSQL version : ""PostgreSQL 9.4.4 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.9.1-16ubuntu6) 4.9.1, 64-bit""
- DB conf : 
{{{
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'test',
        'USER': 'test',
        'PASSWORD': 'test',
        'HOST': 'localhost',
        'PORT': '',
    },
}
}}}

'''Following those steps:'''
1 - creating a minimal model example including a DurationField
{{{
class Foo(models.Model):
    bar = models.DurationField()
}}}

2 - migrate the new model
{{{
$ python manage.py makemigrations AppName
$ python manage.py migrate
}}}

3 - then check the type of the 'bar' DB column related to the 'bar' DurationField on the 'appname_foo' generated table
{{{
\d appname_foo
}}}

=> The datatype associated to the bar column is not interval as expected but float"	Bug	closed	Database layer (models, ORM)	1.9	Normal	worksforme	makemigrations, DurationField, postgresql, psycopg2	benjellounayoub@…	Unreviewed	0	0	0	0	0	0
