# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-12-05 16:17
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('tracks', '0013_auto_20161201_0820'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Race',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_created=True)),
                ('laps', models.PositiveSmallIntegerField(default=1)),
                ('status', models.CharField(choices=[('p', 'planning'), ('i', 'initializing'), ('r', 'running'), ('f', 'finished')], default='p', max_length=1)),
                ('hosting_date', models.DateTimeField(null=True)),
                ('link', models.URLField(help_text='could be a screenshot URL of the results', null=True)),
                ('comment', models.TextField(default='')),
                ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('laptimes', models.ManyToManyField(to='tracks.Laptime')),
                ('track', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tracks.Track')),
            ],
        ),
    ]
