# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-27 05:47
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('submissions', '0005_remove_submission_contest'),
        ('contests', '0011_auto_20170127_1345'),
    ]

    operations = [
        migrations.CreateModel(
            name='ContestSubmission',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('problem', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='submissions', to='contests.ContestProblem')),
                ('submission', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='involved_contest', to='submissions.Submission')),
            ],
            options={
                'verbose_name_plural': '比赛提交',
                'ordering': ('problem', 'submission'),
                'verbose_name': '比赛提交',
            },
        ),
        migrations.AlterUniqueTogether(
            name='contestsubmission',
            unique_together=set([('problem', 'submission')]),
        ),
    ]
