<filename>cloud-run-django-terraform/gametracker/migrations/0002_game_match_player.py
# Generated by Django 3.2 on 2021-06-28 00:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('gametracker', '0001_createsuperuser'),
    ]

    operations = [
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('icon', models.CharField(max_length=5)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Match',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datetime', models.DateTimeField()),
                ('notes', models.TextField()),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='gametracker.game')),
                ('players', models.ManyToManyField(related_name='players', to='gametracker.Player', verbose_name='List of players')),
                ('winner', models.ForeignKey(default=None, on_delete=django.db.models.deletion.RESTRICT, related_name='winner', to='gametracker.player')),
            ],
            options={
                'verbose_name_plural': 'matches',
            },
        ),
    ]
