# Generated by Django 2.2.3 on 2019-07-18 12:10

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('content', '0002_auto_20190717_2207'),
    ]

    operations = [
        migrations.CreateModel(
            name='Contestant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('rank', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Ruler',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='ProblemScore',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('p_id', models.IntegerField(unique=True)),
                ('score', models.FloatField()),
                ('contestant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='problem_scores', to='scoreboard.Contestant')),
            ],
        ),
        migrations.CreateModel(
            name='ContestTier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('persian_name', models.CharField(max_length=50)),
                ('english_name', models.CharField(max_length=50)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='content.Event')),
            ],
        ),
        migrations.AddField(
            model_name='contestant',
            name='country',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scoreboard.Country'),
        ),
        migrations.AddField(
            model_name='contestant',
            name='event_tier',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scoreboard.ContestTier'),
        ),
        migrations.AddField(
            model_name='contestant',
            name='ruler',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scoreboard.Ruler'),
        ),
    ]
