# Generated by Django 4.2.3 on 2023-08-03 14:26
from django.db import migrations
from tqdm import tqdm


def update_external_wall_material(apps, schema_editor):
    assets_cls = apps.get_model("intecomm_subject.healtheconomicsassets")
    total = assets_cls.objects.all().count()
    for obj in tqdm(assets_cls.objects.all(), total=total):
        if obj.external_wall_material == "4":
            obj.external_wall_material = "5"
            obj.save_base(update_fields=["external_wall_material"])


class Migration(migrations.Migration):
    dependencies = [
        ("intecomm_subject", "0079_auto_20230803_0634"),
    ]

    operations = [migrations.RunPython(update_external_wall_material)]
