# Generated by Django 2.1.2 on 2019-03-27 16:21

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


class Migration(migrations.Migration):

    dependencies = [
        ('data', '0030_task_created_at'),
    ]

    operations = [
        migrations.CreateModel(
            name='TaskSource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('source_id', models.SlugField(max_length=256)),
                ('name', models.CharField(max_length=1024)),
                ('public', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now=True)),
                ('judge', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data.Judge')),
            ],
        ),
        migrations.AddField(
            model_name='task',
            name='source',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='data.TaskSource'),
        ),
        migrations.AlterUniqueTogether(
            name='tasksource',
            unique_together={('judge', 'source_id')},
        ),
    ]
