"""Update the My Sign applet's display name — "Game Sign" → "My Sign".

User clarified naming convention 2026-05-18: **applets** use the "My X"
prefix (My Sign, My Sea, My Posts, etc.) while **standalone pages** use
the "Game/Dash/Bill X" prefix (Game Sign page, Game Sea page, Game Kit
page). Sprint 4a's initial migration (0009) set the applet name to
"Game Sign", which the user corrected after seeing the gear-menu toggle
list show the wrong word. Slug stays `my-sign` (URL + selectors stable).
"""
from django.db import migrations


def rename(apps, schema_editor):
    Applet = apps.get_model("applets", "Applet")
    Applet.objects.filter(slug="my-sign").update(name="My Sign")


def unrename(apps, schema_editor):
    Applet = apps.get_model("applets", "Applet")
    Applet.objects.filter(slug="my-sign").update(name="Game Sign")


class Migration(migrations.Migration):

    dependencies = [
        ("applets", "0009_seed_my_sig_applet"),
    ]

    operations = [
        migrations.RunPython(rename, unrename),
    ]
