# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later

# Generated by Django 4.1.7 on 2023-04-18 11:55

from django.db import migrations


def rename_be_latn(apps, schema_editor):
    Profile = apps.get_model("accounts", "Profile")

    db_alias = schema_editor.connection.alias

    Profile.objects.using(db_alias).filter(language="be@latin").update(
        language="be-latn"
    )


class Migration(migrations.Migration):
    dependencies = [
        ("accounts", "0023_cleanup_deleted_users"),
    ]

    operations = [
        migrations.RunPython(rename_be_latn, migrations.RunPython.noop, elidable=True),
    ]
