# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-02 15:50
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0005_auto_20170220_1412'),
    ]

    operations = [
        migrations.CreateModel(
            name='Edge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='EdgeModRelation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('current_mod_source', models.BooleanField(default=True)),
                ('current_mod_target', models.BooleanField(default=True)),
                ('edge', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Edge')),
                ('mod', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.User')),
            ],
        ),
        migrations.CreateModel(
            name='Graph',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('valid', models.BooleanField(default=False)),
            ],
        ),
        migrations.AlterField(
            model_name='subredditevent',
            name='recorded',
            field=models.DateTimeField(),
        ),
        migrations.AddField(
            model_name='edge',
            name='graph',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Graph'),
        ),
        migrations.AddField(
            model_name='edge',
            name='mods',
            field=models.ManyToManyField(through='api.EdgeModRelation', to='api.User'),
        ),
        migrations.AddField(
            model_name='edge',
            name='source',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.Subreddit'),
        ),
        migrations.AddField(
            model_name='edge',
            name='target',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='api.Subreddit'),
        ),
        migrations.AddField(
            model_name='subreddit',
            name='graph',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Graph'),
        ),
    ]
