# Generated by Django 5.2.8 on 2026-02-01

from django.db import migrations


def fix_movie_progress(apps, _):
    """Set progress=1 for movies with status=Completed and progress=0."""
    Movie = apps.get_model("app", "Movie")
    Movie.objects.filter(status="Completed", progress=0).update(progress=1)


class Migration(migrations.Migration):
    """Migration to fix movie progress."""

    dependencies = [
        ("app", "0053_add_boardgame"),
    ]

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