# Generated by Django 5.2 on 2025-06-13 14:55

from django.db import migrations, models

def update_repeating_status(apps, schema_editor):
    """Update Repeating status to In Progress for TV and Season models."""
    TV = apps.get_model("app", "TV")
    Season = apps.get_model("app", "Season")

    TV.objects.filter(status="Repeating").update(status="In progress")
    Season.objects.filter(status="Repeating").update(status="In progress")


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0047_alter_anime_options_alter_basicmedia_options_and_more'),
    ]

    operations = [
        migrations.RunPython(update_repeating_status, reverse_code=migrations.RunPython.noop),
       migrations.AlterModelOptions(
            name='anime',
            options={'ordering': ['user', 'item', '-created_at']},
        ),
        migrations.AlterModelOptions(
            name='basicmedia',
            options={'ordering': ['user', 'item', '-created_at']},
        ),
        migrations.AlterModelOptions(
            name='book',
            options={'ordering': ['user', 'item', '-created_at']},
        ),
        migrations.AlterModelOptions(
            name='comic',
            options={'ordering': ['user', 'item', '-created_at']},
        ),
        migrations.AlterModelOptions(
            name='episode',
            options={'ordering': ['related_season', 'item__episode_number', '-end_date', '-created_at']},
        ),
        migrations.AlterModelOptions(
            name='game',
            options={'ordering': ['user', 'item', '-created_at']},
        ),
        migrations.AlterModelOptions(
            name='manga',
            options={'ordering': ['user', 'item', '-created_at']},
        ),
        migrations.AlterModelOptions(
            name='movie',
            options={'ordering': ['user', 'item', '-created_at']},
        ),
        migrations.RemoveField(
            model_name='anime',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='basicmedia',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='book',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='comic',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='episode',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='game',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='historicalanime',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='historicalbasicmedia',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='historicalbook',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='historicalcomic',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='historicalepisode',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='historicalgame',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='historicalmanga',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='historicalmovie',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='manga',
            name='repeats',
        ),
        migrations.RemoveField(
            model_name='movie',
            name='repeats',
        ),
        migrations.AlterField(
            model_name='anime',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='basicmedia',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='book',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='comic',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='game',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='historicalanime',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='historicalbasicmedia',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='historicalbook',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='historicalcomic',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='historicalgame',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='historicalmanga',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='historicalmovie',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='historicalseason',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='historicaltv',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='manga',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='movie',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='season',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
        migrations.AlterField(
            model_name='tv',
            name='status',
            field=models.CharField(choices=[('Completed', 'Completed'), ('In progress', 'In Progress'), ('Planning', 'Planning'), ('Paused', 'Paused'), ('Dropped', 'Dropped')], default='Completed', max_length=20),
        ),
    ]
