<gh_stars>0
# Generated by Django 3.1.5 on 2021-01-07 21:50

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True)),
                ('description_short', models.CharField(max_length=50)),
                ('description_long', models.CharField(max_length=250)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('players_min', models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(1)])),
                ('players_max', models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(1)])),
                ('expands', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='games.game')),
            ],
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='GenreCategory',
            fields=[
                ('category_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='games.category')),
            ],
            bases=('games.category',),
        ),
        migrations.CreateModel(
            name='PlatformCategory',
            fields=[
                ('category_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='games.category')),
            ],
            bases=('games.category',),
        ),
        migrations.CreateModel(
            name='TimeCategory',
            fields=[
                ('category_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='games.category')),
            ],
            bases=('games.category',),
        ),
        migrations.CreateModel(
            name='Match',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comments', models.CharField(max_length=250)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.game')),
                ('players', models.ManyToManyField(related_name='players', to='games.Player')),
                ('winners', models.ManyToManyField(related_name='winners', to='games.Player')),
            ],
        ),
        migrations.AddField(
            model_name='game',
            name='genre',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.genrecategory'),
        ),
        migrations.AddField(
            model_name='game',
            name='platform',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.platformcategory'),
        ),
        migrations.AddField(
            model_name='game',
            name='time',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.timecategory'),
        ),
    ]

# Generated by Django 3.1.5 on 2021-01-07 21:50

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True)),
                ('description_short', models.CharField(max_length=50)),
                ('description_long', models.CharField(max_length=250)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('players_min', models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(1)])),
                ('players_max', models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(1)])),
                ('expands', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='games.game')),
            ],
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, unique=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='GenreCategory',
            fields=[
                ('category_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='games.category')),
            ],
            bases=('games.category',),
        ),
        migrations.CreateModel(
            name='PlatformCategory',
            fields=[
                ('category_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='games.category')),
            ],
            bases=('games.category',),
        ),
        migrations.CreateModel(
            name='TimeCategory',
            fields=[
                ('category_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='games.category')),
            ],
            bases=('games.category',),
        ),
        migrations.CreateModel(
            name='Match',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comments', models.CharField(max_length=250)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.game')),
                ('players', models.ManyToManyField(related_name='players', to='games.Player')),
                ('winners', models.ManyToManyField(related_name='winners', to='games.Player')),
            ],
        ),
        migrations.AddField(
            model_name='game',
            name='genre',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.genrecategory'),
        ),
        migrations.AddField(
            model_name='game',
            name='platform',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.platformcategory'),
        ),
        migrations.AddField(
            model_name='game',
            name='time',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.timecategory'),
        ),
    ]
# Generated by Django 3.1.5 on 2021-01-07 21:50