# Generated by Django 2.2.24 on 2021-09-05 16:57

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('lactolyse', '0006_lactate_run_analysis'),
    ]

    operations = [
        migrations.CreateModel(
            name='CriticalPowerAnalyses',
            fields=[
                (
                    'id',
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name='ID',
                    ),
                ),
                ('created', models.DateField(auto_now_add=True)),
                (
                    'report',
                    models.FileField(
                        upload_to=lactolyse.models.generate_lactate_threshold_name
                    ),
                ),
                ('result', models.IntegerField(null=True)),
                (
                    'athlete',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to='lactolyse.Athlete',
                    ),
                ),
                (
                    'contributor',
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name='CriticalPowerMeasurement',
            fields=[
                (
                    'id',
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name='ID',
                    ),
                ),
                ('time', models.IntegerField()),
                ('power', models.IntegerField()),
                (
                    'analyses',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to='lactolyse.CriticalPowerAnalyses',
                    ),
                ),
            ],
        ),
    ]
