# Generated by Django 2.2.7 on 2019-11-30 18:35

import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('crossfit', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Exercices',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number_of_reps', models.IntegerField(blank=True, null=True)),
                ('number_of_series', models.IntegerField(blank=True, null=True)),
                ('ris', models.DurationField(blank=True, null=True)),
                ('position', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Log',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(default=django.utils.timezone.now)),
                ('skill', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='crossfit.Skill')),
            ],
        ),
        migrations.CreateModel(
            name='RestPause',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DurationField(blank=True, null=True)),
                ('position', models.IntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TypeOf',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description', django.contrib.postgres.fields.jsonb.JSONField()),
            ],
        ),
        migrations.RemoveField(
            model_name='workout',
            name='comment',
        ),
        migrations.RemoveField(
            model_name='workout',
            name='date',
        ),
        migrations.RemoveField(
            model_name='workout',
            name='score',
        ),
        migrations.RemoveField(
            model_name='workout',
            name='skill',
        ),
        migrations.RemoveField(
            model_name='workout',
            name='wod',
        ),
        migrations.AddField(
            model_name='wod',
            name='comment',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='wod',
            name='score',
            field=django.contrib.postgres.fields.jsonb.JSONField(default={}),
        ),
        migrations.AlterField(
            model_name='mouvement',
            name='description',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='wod',
            name='type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='crossfit.TypeOf'),
        ),
        migrations.DeleteModel(
            name='Score',
        ),
        migrations.DeleteModel(
            name='TypeOfWod',
        ),
        migrations.AddField(
            model_name='log',
            name='wod',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='crossfit.Wod'),
        ),
        migrations.AddField(
            model_name='log',
            name='workout',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='crossfit.Workout'),
        ),
        migrations.AddField(
            model_name='exercices',
            name='mouvement',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='crossfit.Mouvement'),
        ),
        migrations.AddField(
            model_name='skill',
            name='type',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='crossfit.TypeOf'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='workout',
            name='exercices',
            field=models.ManyToManyField(to='crossfit.Exercices'),
        ),
        migrations.AddField(
            model_name='workout',
            name='rest',
            field=models.ManyToManyField(to='crossfit.RestPause'),
        ),
    ]
