# Generated by Django 5.2 on 2025-06-13 15:11

from django.db import migrations

def update_repeating_to_in_progress(apps, schema_editor):
    User = apps.get_model("users", "User")

    media_types = [
        'tv', 'season', 'movie', 'anime', 
        'manga', 'game', 'book', 'comic'
    ]

    for media_type in media_types:
        status_field = f"{media_type}_status"
        User.objects.filter(**{status_field: "Repeating"}).update(**{status_field: "In progress"})


class Migration(migrations.Migration):

    dependencies = [
        ('users', '0035_remove_user_tv_status_valid_and_more'),
        ('app', '0047_alter_anime_options_alter_basicmedia_options_and_more'),
    ]

    operations = [
        migrations.RunPython(
            update_repeating_to_in_progress,
            reverse_code=migrations.RunPython.noop,
        ),
    ]