# Generated by Django 2.0.1 on 2018-06-25 15:17

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import kvasaheim.models


class Migration(migrations.Migration):

    dependencies = [
        ('kvasaheim', '0007_auto_20180622_2038'),
    ]

    operations = [
        migrations.CreateModel(
            name='Path',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('direction', models.IntegerField(choices=[(1, 'Depends'), (2, 'Recommends')])),
            ],
        ),
        migrations.AlterField(
            model_name='attempt',
            name='problem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attempts', related_query_name='attempt', to='kvasaheim.ProblemInstance'),
        ),
        migrations.AlterField(
            model_name='attempt',
            name='user',
            field=models.ForeignKey(on_delete=models.SET(kvasaheim.models.get_sentinel_user), related_name='attempts', related_query_name='attempt', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='comment',
            name='attempt',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', related_query_name='comment', to='kvasaheim.Attempt'),
        ),
        migrations.AlterField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(on_delete=models.SET(kvasaheim.models.get_sentinel_user), related_name='comments', related_query_name='comment', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='problem',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='problems', related_query_name='problem', to='kvasaheim.Category'),
        ),
        migrations.AlterField(
            model_name='probleminstance',
            name='problem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='instances', related_query_name='instance', to='kvasaheim.Problem'),
        ),
        migrations.AddField(
            model_name='path',
            name='from_problem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_problems', related_query_name='from_problem', to='kvasaheim.Problem'),
        ),
        migrations.AddField(
            model_name='path',
            name='to_problem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_problems', related_query_name='to_problem', to='kvasaheim.Problem'),
        ),
        migrations.AddField(
            model_name='problem',
            name='paths',
            field=models.ManyToManyField(related_name='path', related_query_name='path', through='kvasaheim.Path', to='kvasaheim.Problem'),
        ),
    ]
