# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-02-19 21:08
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Badge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
                ('badge_image', models.ImageField(blank=True, upload_to='media/badges/')),
                ('points', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='BadgesToUsers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('badge', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.Badge')),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('victor', models.IntegerField(choices=[(0, 'Player 1'), (1, 'Player 2')])),
                ('round_number', models.IntegerField(blank=True, default=1)),
            ],
        ),
        migrations.CreateModel(
            name='PowerRank',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
            ],
        ),
        migrations.CreateModel(
            name='PowerRankToUsers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rank', models.IntegerField()),
                ('powerrank', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.PowerRank')),
            ],
        ),
        migrations.CreateModel(
            name='Season',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
                ('start_date', models.DateTimeField()),
                ('end_date', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Set',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('child_set', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mainApp.Set')),
            ],
        ),
        migrations.CreateModel(
            name='Tournament',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('name', models.CharField(max_length=250)),
                ('season', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.Season')),
            ],
        ),
        migrations.CreateModel(
            name='TournamentToUsers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tournament', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.Tournament')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('real_name', models.CharField(max_length=250)),
                ('tag', models.CharField(max_length=250)),
                ('profile_picture', models.ImageField(blank=True, null=True, upload_to='media/users/')),
                ('join_date', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='UserTags',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag', models.CharField(max_length=250)),
                ('tournament', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.Tournament')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.User')),
            ],
        ),
        migrations.AddField(
            model_name='tournamenttousers',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.User'),
        ),
        migrations.AddField(
            model_name='set',
            name='player_one',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='set_player_one_id', to='mainApp.User'),
        ),
        migrations.AddField(
            model_name='set',
            name='player_two',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='set_player_two_id', to='mainApp.User'),
        ),
        migrations.AddField(
            model_name='set',
            name='tournament',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.Tournament'),
        ),
        migrations.AddField(
            model_name='set',
            name='victor',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='set_victor_id', to='mainApp.User'),
        ),
        migrations.AddField(
            model_name='powerranktousers',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.User'),
        ),
        migrations.AddField(
            model_name='powerrank',
            name='season',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.Season'),
        ),
        migrations.AddField(
            model_name='game',
            name='set',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.Set'),
        ),
        migrations.AddField(
            model_name='badgestousers',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainApp.User'),
        ),
    ]
