# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-27 17:35
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ModelWithNaturalKey',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('note', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='NaturalKeyChild',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='NaturalKeyParent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField()),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='naturalkeyparent',
            unique_together=set([('slug',)]),
        ),
        migrations.AddField(
            model_name='naturalkeychild',
            name='parent',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='naturalkey_app.NaturalKeyParent'),
        ),
        migrations.AddField(
            model_name='modelwithnaturalkey',
            name='key',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='naturalkey_app.NaturalKeyChild'),
        ),
        migrations.AlterUniqueTogether(
            name='naturalkeychild',
            unique_together=set([('parent', 'date')]),
        ),
    ]
