# Generated by Django 3.1.7 on 2021-03-22 00:18

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='GameGenres',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gamegenre', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name_plural': 'gamegenres',
                'db_table': 'gamegenre',
            },
        ),
        migrations.CreateModel(
            name='Games',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gametitle', models.CharField(max_length=255)),
                ('minplayers', models.IntegerField()),
                ('maxplayers', models.IntegerField()),
                ('playtime', models.DurationField()),
                ('minage', models.IntegerField()),
                ('publishdate', models.DateField()),
                ('gamegenre', models.ManyToManyField(to='gamenightapp.GameGenres')),
            ],
            options={
                'verbose_name_plural': 'games',
                'db_table': 'game',
            },
        ),
        migrations.CreateModel(
            name='GameTypes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gametype', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name_plural': 'gametypes',
                'db_table': 'gametype',
            },
        ),
        migrations.CreateModel(
            name='Publishers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('publishername', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name_plural': 'publishers',
                'db_table': 'publisher',
            },
        ),
        migrations.CreateModel(
            name='Inventory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('lastplayeddate', models.DateField()),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamenightapp.games')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'inventories',
                'db_table': 'inventory',
            },
        ),
        migrations.AddField(
            model_name='games',
            name='gametype',
            field=models.ManyToManyField(to='gamenightapp.GameTypes'),
        ),
        migrations.AddField(
            model_name='games',
            name='publisher',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='gamenightapp.publishers'),
        ),
        migrations.CreateModel(
            name='FriendsList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('frienddate', models.DateField()),
                ('friend', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='friends', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='FriendsList', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'FriendLists',
                'db_table': 'FriendList',
            },
        ),
    ]
