From b4eefea7f95c5f0d3262c8d95b265abfe4cc097c Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Thu, 17 Aug 2017 23:14:16 -0400 Subject: [PATCH] Recreate initial migration. --- core/migrations/0001_initial.py | 11 +++++++---- core/migrations/0002_timer_user.py | 24 ------------------------ 2 files changed, 7 insertions(+), 28 deletions(-) delete mode 100644 core/migrations/0002_timer_user.py diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py index cd652672..cc84f778 100644 --- a/core/migrations/0001_initial.py +++ b/core/migrations/0001_initial.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.11.4 on 2017-08-17 15:22 +# Generated by Django 1.11.4 on 2017-08-18 03:13 from __future__ import unicode_literals +from django.conf import settings from django.db import migrations, models import django.db.models.deletion @@ -11,6 +12,7 @@ class Migration(migrations.Migration): initial = True dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ @@ -23,8 +25,8 @@ class Migration(migrations.Migration): ('birth_date', models.DateField()), ], options={ - 'verbose_name_plural': 'Children', 'ordering': ['last_name', 'first_name'], + 'verbose_name_plural': 'Children', 'default_permissions': ('view', 'add', 'change', 'delete'), }, ), @@ -81,8 +83,8 @@ class Migration(migrations.Migration): ('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sleep', to='core.Child')), ], options={ - 'verbose_name_plural': 'Sleep', 'ordering': ['-start'], + 'verbose_name_plural': 'Sleep', 'default_permissions': ('view', 'add', 'change', 'delete'), }, ), @@ -90,10 +92,11 @@ class Migration(migrations.Migration): name='Timer', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(blank=True, max_length=255)), + ('name', models.CharField(blank=True, max_length=255, null=True)), ('start', models.DateTimeField(auto_now=True)), ('end', models.DateTimeField(blank=True, editable=False, null=True)), ('active', models.BooleanField(default=True, editable=False)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='timers', to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ['active', '-start'], diff --git a/core/migrations/0002_timer_user.py b/core/migrations/0002_timer_user.py deleted file mode 100644 index 2ab2759a..00000000 --- a/core/migrations/0002_timer_user.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.4 on 2017-08-17 18:26 -from __future__ import unicode_literals - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('core', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='timer', - name='user', - field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='timers', to=settings.AUTH_USER_MODEL), - preserve_default=False, - ), - ]