johnpaulett / django-durationfield

Temporary reusable Django application for adding a DurationField, until Django issue #2443 is resolved.
http://django-durationfield.readthedocs.org
67 stars 24 forks source link

DurationField is not created in the database (Django 1.7) #15

Open blueyed opened 10 years ago

blueyed commented 10 years ago

I am moving a project over to Django 1.7 and noticed that the DurationField for the model gets not created in the database.

The migrations itself appear to handle it (and renames to it), but it does not appear in the actual database (PostgreSQL).

I suspect this might be an issue in Django itself, but wanted to raise it here first.

From the initial migration:

('runtime', durationfield.db.models.fields.duration.DurationField(help_text=u'Format: HH:MM:SS', null=True, verbose_name=u'Playtime')),

Let me know, if I should provide a test case, but maybe it is a known issue already.

Also note, that I was using SQLite initially (where it worked), but now switched to PostgreSQL (with a new DB).

johnpaulett commented 10 years ago

I have not tried running under 1.7-alpha yet, so this is not a known issue. Test case / patch more than welcome.

We provide an introspection rule for South via add_introspection_rules. Perhaps this is related to the new native migrations in 1.7? Are you using South still or Django's internal migrations? Can you provide more detail on exactly what you did to create & apply the migration.