# Generated by Django 2.1 on 2019-01-28 01:57

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('games', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ConfirmedAlike',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('confirmed_by', models.CharField(choices=[('NTD', 'Nintendo'), ('STF', 'Site staff'), ('VOT', 'Vote')], max_length=3)),
                ('game1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alike_game1', to='games.SwitchGame')),
                ('game2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alike_game2', to='games.SwitchGame')),
            ],
        ),
        migrations.CreateModel(
            name='ConfirmedHighlight',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('confirmed_by', models.CharField(choices=[('STF', 'Site staff'), ('VOT', 'Vote')], max_length=3)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.SwitchGame')),
            ],
        ),
        migrations.CreateModel(
            name='ConfirmedTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('confirmed_by', models.CharField(choices=[('NTD', 'Nintendo'), ('STF', 'Site staff'), ('VOT', 'Vote')], max_length=3)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.SwitchGame')),
            ],
        ),
        migrations.CreateModel(
            name='Recomendation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('recomends', models.BooleanField()),
                ('date', models.DateTimeField(auto_now=True)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.SwitchGame')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('review_text', models.TextField()),
                ('post_date', models.DateTimeField(auto_now_add=True)),
                ('last_update_date', models.DateTimeField(auto_now=True)),
                ('has_edited', models.BooleanField(default=False)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.SwitchGame')),
                ('recomendation', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='classification.Recomendation')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SuggestAlike',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('game1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='suggested_alike_game1', to='games.SwitchGame')),
                ('game2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='suggested_alike_game2', to='games.SwitchGame')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SuggestedTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.BooleanField(default=True)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.SwitchGame')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='TagGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('allow_vote', models.BooleanField(default=True)),
                ('min_games_for_search', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='VoteReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vote', models.BooleanField()),
                ('review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='classification.Review')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Wishlist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now=True)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='games.SwitchGame')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='tag',
            name='tag_group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='classification.TagGroup'),
        ),
        migrations.AddField(
            model_name='suggestedtag',
            name='tag',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='classification.Tag'),
        ),
        migrations.AddField(
            model_name='suggestedtag',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='confirmedtag',
            name='tag',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='classification.Tag'),
        ),
        migrations.AlterUniqueTogether(
            name='wishlist',
            unique_together={('game', 'user')},
        ),
        migrations.AlterUniqueTogether(
            name='votereview',
            unique_together={('review', 'user')},
        ),
        migrations.AlterUniqueTogether(
            name='tag',
            unique_together={('name', 'tag_group')},
        ),
        migrations.AlterUniqueTogether(
            name='suggestedtag',
            unique_together={('tag', 'game', 'user')},
        ),
        migrations.AlterUniqueTogether(
            name='suggestalike',
            unique_together={('game1', 'game2', 'user')},
        ),
        migrations.AlterUniqueTogether(
            name='review',
            unique_together={('game', 'user')},
        ),
        migrations.AlterUniqueTogether(
            name='recomendation',
            unique_together={('game', 'user')},
        ),
        migrations.AlterUniqueTogether(
            name='confirmedtag',
            unique_together={('tag', 'game', 'confirmed_by')},
        ),
        migrations.AlterUniqueTogether(
            name='confirmedhighlight',
            unique_together={('game', 'confirmed_by')},
        ),
        migrations.AlterUniqueTogether(
            name='confirmedalike',
            unique_together={('game1', 'game2', 'confirmed_by')},
        ),
    ]
