# -*- coding: utf-8 -*-
# pylint: disable=invalid-name, missing-docstring, line-too-long
# Generated by Django 1.9.7 on 2016-06-09 11:05
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='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Link',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_one', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='linked_as_one', to='django_linked_items.Item')),
                ('item_two', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='linked_as_two', to='django_linked_items.Item')),
            ],
        ),
        migrations.CreateModel(
            name='Relation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
            ],
        ),
        migrations.AddField(
            model_name='link',
            name='relation',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='link', to='django_linked_items.Relation'),
        ),
        migrations.AlterUniqueTogether(
            name='link',
            unique_together=set([('item_one', 'item_two', 'relation')]),
        ),
    ]
