2017-08-13 21:06:11 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2017-08-19 20:16:42 +00:00
|
|
|
# Generated by Django 1.11.1 on 2017-08-19 20:13
|
2017-08-18 03:14:16 +00:00
|
|
|
from django.conf import settings
|
2017-08-13 21:06:11 +00:00
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
2017-08-18 03:14:16 +00:00
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
2017-08-13 21:06:11 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2017-08-16 19:53:00 +00:00
|
|
|
name='Child',
|
2017-08-13 21:06:11 +00:00
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('first_name', models.CharField(max_length=255)),
|
|
|
|
('last_name', models.CharField(max_length=255)),
|
|
|
|
('birth_date', models.DateField()),
|
2017-08-18 18:59:13 +00:00
|
|
|
('slug', models.SlugField(editable=False, max_length=100, unique=True)),
|
2017-08-13 21:06:11 +00:00
|
|
|
],
|
|
|
|
options={
|
2017-08-18 18:59:13 +00:00
|
|
|
'ordering': ['last_name', 'first_name'],
|
2017-08-16 19:53:00 +00:00
|
|
|
'default_permissions': ('view', 'add', 'change', 'delete'),
|
2017-08-19 20:16:42 +00:00
|
|
|
'verbose_name_plural': 'Children',
|
2017-08-13 21:06:11 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='DiaperChange',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('time', models.DateTimeField()),
|
|
|
|
('wet', models.BooleanField()),
|
|
|
|
('solid', models.BooleanField()),
|
|
|
|
('color', models.CharField(blank=True, choices=[('black', 'Black'), ('brown', 'Brown'), ('green', 'Green'), ('yellow', 'Yellow')], max_length=255)),
|
2017-08-16 19:53:00 +00:00
|
|
|
('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='diaper_change', to='core.Child')),
|
2017-08-13 21:06:11 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ['-time'],
|
2017-08-17 15:23:40 +00:00
|
|
|
'default_permissions': ('view', 'add', 'change', 'delete'),
|
2017-08-13 21:06:11 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Feeding',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('start', models.DateTimeField()),
|
|
|
|
('end', models.DateTimeField()),
|
2017-08-19 20:16:42 +00:00
|
|
|
('duration', models.DurationField(editable=False, null=True)),
|
2017-08-13 21:06:11 +00:00
|
|
|
('type', models.CharField(choices=[('breast milk', 'Breast milk'), ('formula', 'Formula')], max_length=255)),
|
|
|
|
('method', models.CharField(choices=[('bottle', 'Bottle'), ('left breast', 'Left breast'), ('right breast', 'Right breast')], max_length=255)),
|
2017-08-17 15:23:40 +00:00
|
|
|
('amount', models.FloatField(blank=True, null=True)),
|
2017-08-16 19:53:00 +00:00
|
|
|
('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='feeding', to='core.Child')),
|
2017-08-13 21:06:11 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ['-start'],
|
2017-08-17 15:23:40 +00:00
|
|
|
'default_permissions': ('view', 'add', 'change', 'delete'),
|
2017-08-13 21:06:11 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Note',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('note', models.TextField()),
|
|
|
|
('time', models.DateTimeField(auto_now=True)),
|
2017-08-16 19:53:00 +00:00
|
|
|
('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='note', to='core.Child')),
|
2017-08-13 21:06:11 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ['-time'],
|
2017-08-17 15:23:40 +00:00
|
|
|
'default_permissions': ('view', 'add', 'change', 'delete'),
|
2017-08-13 21:06:11 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Sleep',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('start', models.DateTimeField()),
|
|
|
|
('end', models.DateTimeField()),
|
2017-08-19 20:16:42 +00:00
|
|
|
('duration', models.DurationField(editable=False, null=True)),
|
2017-08-16 19:53:00 +00:00
|
|
|
('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sleep', to='core.Child')),
|
2017-08-13 21:06:11 +00:00
|
|
|
],
|
|
|
|
options={
|
2017-08-18 18:59:13 +00:00
|
|
|
'ordering': ['-start'],
|
2017-08-16 19:53:00 +00:00
|
|
|
'default_permissions': ('view', 'add', 'change', 'delete'),
|
2017-08-19 20:16:42 +00:00
|
|
|
'verbose_name_plural': 'Sleep',
|
2017-08-13 21:06:11 +00:00
|
|
|
},
|
|
|
|
),
|
2017-08-17 15:23:40 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='Timer',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2017-08-18 03:14:16 +00:00
|
|
|
('name', models.CharField(blank=True, max_length=255, null=True)),
|
2017-08-18 05:01:37 +00:00
|
|
|
('start', models.DateTimeField(auto_now_add=True)),
|
2017-08-17 15:23:40 +00:00
|
|
|
('end', models.DateTimeField(blank=True, editable=False, null=True)),
|
2017-08-19 20:16:42 +00:00
|
|
|
('duration', models.DurationField(editable=False, null=True)),
|
2017-08-17 15:23:40 +00:00
|
|
|
('active', models.BooleanField(default=True, editable=False)),
|
2017-08-18 03:14:16 +00:00
|
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='timers', to=settings.AUTH_USER_MODEL)),
|
2017-08-17 15:23:40 +00:00
|
|
|
],
|
|
|
|
options={
|
2017-08-18 05:57:07 +00:00
|
|
|
'ordering': ['-active', '-start', '-end'],
|
2017-08-17 15:23:40 +00:00
|
|
|
'default_permissions': ('view', 'add', 'change', 'delete'),
|
|
|
|
},
|
|
|
|
),
|
2017-08-13 21:06:11 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='TummyTime',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('start', models.DateTimeField()),
|
|
|
|
('end', models.DateTimeField()),
|
2017-08-19 20:16:42 +00:00
|
|
|
('duration', models.DurationField(editable=False, null=True)),
|
2017-08-13 21:06:11 +00:00
|
|
|
('milestone', models.CharField(blank=True, max_length=255)),
|
2017-08-16 19:53:00 +00:00
|
|
|
('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tummy_time', to='core.Child')),
|
2017-08-13 21:06:11 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ['-start'],
|
2017-08-17 15:23:40 +00:00
|
|
|
'default_permissions': ('view', 'add', 'change', 'delete'),
|
2017-08-13 21:06:11 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|