dr.botzo/dr_botzo/races/migrations/0001_initial.py

58 lines
1.9 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Race',
fields=[
('key', models.CharField(max_length=16, serialize=False, primary_key=True)),
('name', models.CharField(max_length=255)),
('description', models.TextField()),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Racer',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('nick', models.CharField(max_length=64)),
('joined', models.BooleanField(default=False)),
('started', models.BooleanField(default=False)),
('finished', models.BooleanField(default=False)),
('race', models.ForeignKey(to='races.Race')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='RaceUpdate',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('update', models.TextField()),
('event_time', models.DateTimeField(default=django.utils.timezone.now)),
('race', models.ForeignKey(to='races.Race')),
('racer', models.ForeignKey(to='races.Racer')),
],
options={
'ordering': ['event_time'],
},
bases=(models.Model,),
),
migrations.AlterUniqueTogether(
name='racer',
unique_together=set([('nick', 'race')]),
),
]