<gh_stars>0
# Generated by Django 2.0.3 on 2018-03-08 08:11

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='Match',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('matchday', models.IntegerField(default=0)),
                ('score_home', models.IntegerField(default=-1)),
                ('score_visitor', models.IntegerField(default=-1)),
            ],
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.IntegerField(default=0, verbose_name="The player's score.")),
                ('rank', models.IntegerField(default=1, verbose_name="The player's rank")),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('handle', models.CharField(max_length=3)),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Tipp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('score_home', models.IntegerField(default=0)),
                ('score_visitor', models.IntegerField(default=0)),
                ('match', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='tippspiel.Match')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='tippspiel.Player')),
            ],
        ),
        migrations.AddField(
            model_name='match',
            name='team_home',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='tippspiel.Team'),
        ),
        migrations.AddField(
            model_name='match',
            name='team_visitor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='tippspiel.Team'),
        ),
    ]

# Generated by Django 2.0.3 on 2018-03-08 08:11

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='Match',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('matchday', models.IntegerField(default=0)),
                ('score_home', models.IntegerField(default=-1)),
                ('score_visitor', models.IntegerField(default=-1)),
            ],
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.IntegerField(default=0, verbose_name="The player's score.")),
                ('rank', models.IntegerField(default=1, verbose_name="The player's rank")),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('handle', models.CharField(max_length=3)),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Tipp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('score_home', models.IntegerField(default=0)),
                ('score_visitor', models.IntegerField(default=0)),
                ('match', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='tippspiel.Match')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='tippspiel.Player')),
            ],
        ),
        migrations.AddField(
            model_name='match',
            name='team_home',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='tippspiel.Team'),
        ),
        migrations.AddField(
            model_name='match',
            name='team_visitor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='tippspiel.Team'),
        ),
    ]
# Generated by Django 2.0.3 on 2018-03-08 08:11