# Generated by Django 4.0.5 on 2023-02-24 23:36

from django.db import migrations


def populate_description(apps, schema_editor):
    Plan = apps.get_model("metering_billing", "Plan")
    for plan in Plan.objects.all():
        for plan_version in plan.versions.all():
            plan.plan_description = plan_version.description
            plan.save()
            break


class Migration(migrations.Migration):
    dependencies = [
        (
            "metering_billing",
            "0212_remove_plan_metering_bi_organiz_b5d6d8_idx_and_more",
        ),
    ]

    operations = [
        migrations.RunPython(populate_description),
    ]
