# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-09-18 09:03
from __future__ import unicode_literals

import django.core.serializers.json
from django.db import migrations, models
import django.db.models.deletion
import oxdjango.fields


class Migration(migrations.Migration):

    dependencies = [
        ('entity', '0005_jsonfield'),
    ]

    operations = [
        migrations.CreateModel(
            name='Link',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(max_length=200)),
            ],
        ),
        migrations.AddField(
            model_name='link',
            name='source',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='links', to='entity.Entity'),
        ),
        migrations.AddField(
            model_name='link',
            name='target',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='backlinks', to='entity.Entity'),
        ),
        migrations.AlterUniqueTogether(
            name='link',
            unique_together=set([('source', 'key', 'target')]),
        ),
    ]
