# Generated by Django 2.2.19 on 2021-03-29 15:59

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


class Migration(migrations.Migration):

    dependencies = [
        ("elections", "0015_condorcet"),
    ]

    operations = [
        migrations.CreateModel(
            name="Duel",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "amount",
                    models.PositiveSmallIntegerField(
                        verbose_name="votes supplémentaires"
                    ),
                ),
                (
                    "loser",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="contests_lost",
                        to="elections.Option",
                    ),
                ),
                (
                    "question",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="duels",
                        to="elections.Question",
                    ),
                ),
                (
                    "winner",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="contests_won",
                        to="elections.Option",
                    ),
                ),
            ],
        ),
        migrations.AlterModelOptions(
            name="rank",
            options={"ordering": ["vote"]},
        ),
        migrations.AlterModelOptions(
            name="vote",
            options={"ordering": ["option"]},
        ),
        migrations.DeleteModel(
            name="Matrix",
        ),
    ]
