# Generated by Django 2.0.2 on 2018-02-12 11:09

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Bonus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason', models.TextField()),
                ('points', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('name', models.TextField()),
                ('description', models.TextField()),
                ('id', models.IntegerField(primary_key=True, serialize=False, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='LocationSolve',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Location')),
            ],
        ),
        migrations.CreateModel(
            name='LocationTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Location')),
            ],
        ),
        migrations.CreateModel(
            name='LocationTaskSolve',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('points', models.IntegerField()),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.LocationTask')),
            ],
        ),
        migrations.CreateModel(
            name='Penalty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason', models.TextField()),
                ('points', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Picture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('points', models.IntegerField()),
                ('image', models.ImageField(upload_to=functools.partial(rially.models._update_filename, *(), **{'path': ''}))),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Location')),
            ],
        ),
        migrations.CreateModel(
            name='PictureSolve',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Picture')),
            ],
        ),
        migrations.CreateModel(
            name='Puzzle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
                ('file', models.FileField(blank=True, null=True, upload_to=functools.partial(rially.models._update_filename, *(), **{'path': ''}))),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Location')),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='TaskSolve',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('points', models.IntegerField()),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Task')),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='tasksolve',
            name='team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Team'),
        ),
        migrations.AddField(
            model_name='picturesolve',
            name='team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Team'),
        ),
        migrations.AddField(
            model_name='penalty',
            name='team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Team'),
        ),
        migrations.AddField(
            model_name='locationtasksolve',
            name='team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Team'),
        ),
        migrations.AddField(
            model_name='locationsolve',
            name='team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Team'),
        ),
        migrations.AddField(
            model_name='bonus',
            name='team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rially.Team'),
        ),
    ]
