# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-08-25 22:01
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('problem', '0004_remove_problem_created_by'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProblemManagement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('permission', models.CharField(choices=[('a', 'ADMIN'), ('r', 'READ'), ('w', 'WRITE')], max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='SpecialProgram',
            fields=[
                ('fingerprint', models.CharField(max_length=64, primary_key=True, serialize=False)),
                ('category', models.CharField(choices=[('checker', 'checker'), ('generator', 'generator'), ('interactor', 'interactor'), ('validator', 'validator')], max_length=12)),
                ('filename', models.CharField(max_length=64)),
                ('lang', models.CharField(choices=[('c', 'C'), ('cpp', 'C++11'), ('python', 'Python 3'), ('java', 'Java 8'), ('cc14', 'C++14'), ('cs', 'C#'), ('py2', 'Python 2'), ('php', 'PHP 7'), ('perl', 'Perl'), ('hs', 'Haskell'), ('js', 'Javascript'), ('ocaml', 'OCaml'), ('pypy', 'PyPy'), ('pas', 'Pascal'), ('rs', 'Rust')], default='cpp', max_length=12, verbose_name='language')),
                ('code', models.TextField(blank=True)),
                ('builtin', models.BooleanField(default=False)),
            ],
        ),
        migrations.RemoveField(
            model_name='problem',
            name='sum_time_limit',
        ),
        migrations.RemoveField(
            model_name='problem',
            name='testdata_hash',
        ),
        migrations.RemoveField(
            model_name='problem',
            name='testdata_size',
        ),
        migrations.RemoveField(
            model_name='problem',
            name='total_accept_number',
        ),
        migrations.RemoveField(
            model_name='problem',
            name='total_submit_number',
        ),
        migrations.AddField(
            model_name='problem',
            name='alias',
            field=models.CharField(blank=True, max_length=64),
        ),
        migrations.AddField(
            model_name='problem',
            name='cases',
            field=models.TextField(blank=True),
        ),
        migrations.AddField(
            model_name='problem',
            name='checker',
            field=models.CharField(default='3813d49afd13857026fcd4643f51689c39639f83c2b4136b8d95ed285510a00f', max_length=64),
        ),
        migrations.AddField(
            model_name='problem',
            name='interactor',
            field=models.CharField(blank=True, max_length=64),
        ),
        migrations.AddField(
            model_name='problem',
            name='maintaining',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='problem',
            name='points',
            field=models.TextField(blank=True),
        ),
        migrations.AddField(
            model_name='problem',
            name='pretests',
            field=models.TextField(blank=True),
        ),
        migrations.AddField(
            model_name='problem',
            name='update_time',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AddField(
            model_name='problem',
            name='validator',
            field=models.CharField(blank=True, max_length=64),
        ),
        migrations.AlterField(
            model_name='problem',
            name='create_time',
            field=models.DateTimeField(auto_now_add=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='description',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='hint',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='input',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='memory_limit',
            field=models.IntegerField(default=256),
        ),
        migrations.AlterField(
            model_name='problem',
            name='output',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='sample',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='source',
            field=models.CharField(blank=True, max_length=128),
        ),
        migrations.AlterField(
            model_name='problem',
            name='time_limit',
            field=models.IntegerField(default=1000),
        ),
        migrations.AlterField(
            model_name='problem',
            name='title',
            field=models.CharField(blank=True, max_length=192),
        ),
        migrations.AlterField(
            model_name='problem',
            name='visible',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='problemmanagement',
            name='problem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='problem.Problem'),
        ),
        migrations.AddField(
            model_name='problemmanagement',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='problem',
            name='manager',
            field=models.ManyToManyField(through='problem.ProblemManagement', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='problemmanagement',
            unique_together=set([('problem', 'user')]),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-08-25 22:01
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('problem', '0004_remove_problem_created_by'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProblemManagement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('permission', models.CharField(choices=[('a', 'ADMIN'), ('r', 'READ'), ('w', 'WRITE')], max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='SpecialProgram',
            fields=[
                ('fingerprint', models.CharField(max_length=64, primary_key=True, serialize=False)),
                ('category', models.CharField(choices=[('checker', 'checker'), ('generator', 'generator'), ('interactor', 'interactor'), ('validator', 'validator')], max_length=12)),
                ('filename', models.CharField(max_length=64)),
                ('lang', models.CharField(choices=[('c', 'C'), ('cpp', 'C++11'), ('python', 'Python 3'), ('java', 'Java 8'), ('cc14', 'C++14'), ('cs', 'C#'), ('py2', 'Python 2'), ('php', 'PHP 7'), ('perl', 'Perl'), ('hs', 'Haskell'), ('js', 'Javascript'), ('ocaml', 'OCaml'), ('pypy', 'PyPy'), ('pas', 'Pascal'), ('rs', 'Rust')], default='cpp', max_length=12, verbose_name='language')),
                ('code', models.TextField(blank=True)),
                ('builtin', models.BooleanField(default=False)),
            ],
        ),
        migrations.RemoveField(
            model_name='problem',
            name='sum_time_limit',
        ),
        migrations.RemoveField(
            model_name='problem',
            name='testdata_hash',
        ),
        migrations.RemoveField(
            model_name='problem',
            name='testdata_size',
        ),
        migrations.RemoveField(
            model_name='problem',
            name='total_accept_number',
        ),
        migrations.RemoveField(
            model_name='problem',
            name='total_submit_number',
        ),
        migrations.AddField(
            model_name='problem',
            name='alias',
            field=models.CharField(blank=True, max_length=64),
        ),
        migrations.AddField(
            model_name='problem',
            name='cases',
            field=models.TextField(blank=True),
        ),
        migrations.AddField(
            model_name='problem',
            name='checker',
            field=models.CharField(default='3813d49afd13857026fcd4643f51689c39639f83c2b4136b8d95ed285510a00f', max_length=64),
        ),
        migrations.AddField(
            model_name='problem',
            name='interactor',
            field=models.CharField(blank=True, max_length=64),
        ),
        migrations.AddField(
            model_name='problem',
            name='maintaining',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='problem',
            name='points',
            field=models.TextField(blank=True),
        ),
        migrations.AddField(
            model_name='problem',
            name='pretests',
            field=models.TextField(blank=True),
        ),
        migrations.AddField(
            model_name='problem',
            name='update_time',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AddField(
            model_name='problem',
            name='validator',
            field=models.CharField(blank=True, max_length=64),
        ),
        migrations.AlterField(
            model_name='problem',
            name='create_time',
            field=models.DateTimeField(auto_now_add=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='description',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='hint',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='input',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='memory_limit',
            field=models.IntegerField(default=256),
        ),
        migrations.AlterField(
            model_name='problem',
            name='output',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='sample',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='problem',
            name='source',
            field=models.CharField(blank=True, max_length=128),
        ),
        migrations.AlterField(
            model_name='problem',
            name='time_limit',
            field=models.IntegerField(default=1000),
        ),
        migrations.AlterField(
            model_name='problem',
            name='title',
            field=models.CharField(blank=True, max_length=192),
        ),
        migrations.AlterField(
            model_name='problem',
            name='visible',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='problemmanagement',
            name='problem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='problem.Problem'),
        ),
        migrations.AddField(
            model_name='problemmanagement',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='problem',
            name='manager',
            field=models.ManyToManyField(through='problem.ProblemManagement', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='problemmanagement',
            unique_together=set([('problem', 'user')]),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-08-25 22:01 #'), ('py2', 'Python 2'), ('php', 'PHP 7'), ('perl', 'Perl'), ('hs', 'Haskell'), ('js', 'Javascript'), ('ocaml', 'OCaml'), ('pypy', 'PyPy'), ('pas', 'Pascal'), ('rs', 'Rust')], default='cpp', max_length=12, verbose_name='language')),