# Generated by Django 5.0.2 on 2024-02-12 23:30

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


class Migration(migrations.Migration):
    dependencies = [
        ("trosnoth", "0035_gamerecord_scenario_completed_gamerecord_stats"),
    ]

    operations = [
        migrations.CreateModel(
            name="PlayerInGame",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("index", models.SmallIntegerField()),
                ("bot", models.BooleanField()),
                ("winner", models.BooleanField()),
                (
                    "game",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="trosnoth.gamerecord",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="trosnoth.trosnothuser",
                    ),
                ),
            ],
            options={
                "unique_together": {("game", "index")},
            },
        ),
    ]
