# Generated by Django 2.1.5 on 2019-02-12 21:40

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


class Migration(migrations.Migration):

    dependencies = [
        ('game', '0005_remove_game_player'),
        ('userprofile', '0006_auto_20190210_1915'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserGame',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('in_game_id', models.CharField(max_length=25)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='User_Added_Games', to='game.Game')),
            ],
        ),
        migrations.RemoveField(
            model_name='userprofile',
            name='player_games',
        ),

        migrations.AddField(
            model_name='userprofile',
            name='player_games',
            field=models.ManyToManyField(blank=True, related_name='games', through='userprofile.UserGame',
                                         to='game.Game'),
        ),
        migrations.AddField(
            model_name='usergame',
            name='player',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Game_Player', to='userprofile.UserProfile'),
        ),
    ]
