# Generated by Django 4.2.29 on 2026-08-07 16:27

import uuid

import django.db.models.deletion
import django_extensions.db.fields
import workouts.models
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("workouts", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="WorkoutRoutineExercise",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    django_extensions.db.fields.CreationDateTimeField(
                        auto_now_add=True, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    django_extensions.db.fields.ModificationDateTimeField(
                        auto_now=True, verbose_name="modified"
                    ),
                ),
                ("sequence", models.PositiveIntegerField(default=0)),
                ("target_sets", models.PositiveIntegerField(blank=True, null=True)),
                ("target_reps", models.PositiveIntegerField(blank=True, null=True)),
                ("target_weight_kg", models.FloatField(blank=True, null=True)),
                ("enabled", models.BooleanField(default=True)),
                (
                    "exercise",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="routine_exercises",
                        to="workouts.exercise",
                    ),
                ),
                (
                    "routine",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="routine_exercises",
                        to="workouts.workoutroutine",
                    ),
                ),
            ],
            options={
                "ordering": ["routine", "sequence"],
            },
        ),
        migrations.CreateModel(
            name="WorkoutImport",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    django_extensions.db.fields.CreationDateTimeField(
                        auto_now_add=True, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    django_extensions.db.fields.ModificationDateTimeField(
                        auto_now=True, verbose_name="modified"
                    ),
                ),
                ("uuid", models.UUIDField(default=uuid.uuid4, editable=False)),
                ("processing_started", models.DateTimeField(blank=True, null=True)),
                ("processed_finished", models.DateTimeField(blank=True, null=True)),
                ("process_log", models.TextField(blank=True, null=True)),
                ("process_count", models.IntegerField(blank=True, null=True)),
                ("error_log", models.TextField(blank=True, null=True)),
                (
                    "sqlite_file",
                    models.FileField(
                        blank=True,
                        null=True,
                        upload_to=workouts.models.WorkoutImport.get_path,
                    ),
                ),
                (
                    "csv_file",
                    models.FileField(
                        blank=True,
                        null=True,
                        upload_to=workouts.models.WorkoutImport.get_path,
                    ),
                ),
                (
                    "original_filename",
                    models.CharField(blank=True, max_length=255, null=True),
                ),
                (
                    "user",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.DO_NOTHING,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "verbose_name": "Workout Import",
            },
        ),
    ]
