# Generated by Django 3.0.5 on 2020-04-25 12:31

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('server', '0008_auto_20200425_0618'),
    ]

    operations = [
        migrations.AddField(
            model_name='mlmodel',
            name='is_principle',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='mlmodel',
            name='prediction_type',
            field=models.CharField(choices=[('Margin', 'Margin'), ('Win Probability', 'Win Probability')], default='Margin', max_length=100),
        ),
        migrations.AddField(
            model_name='mlmodel',
            name='used_in_competitions',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterUniqueTogether(
            name='match',
            unique_together=set(),
        ),
        migrations.AddConstraint(
            model_name='match',
            constraint=models.UniqueConstraint(fields=('start_date_time', 'venue'), name='unique_start_date_time_and_venue'),
        ),
        migrations.AddConstraint(
            model_name='mlmodel',
            constraint=models.UniqueConstraint(condition=models.Q(is_principle=True), fields=('is_principle',), name='one_principle_model'),
        ),
        migrations.AddConstraint(
            model_name='mlmodel',
            constraint=models.UniqueConstraint(condition=models.Q(used_in_competitions=True), fields=('prediction_type',), name='unique_prediction_type_for_competitions'),
        ),
    ]
