# Generated by Django 3.2.12 on 2022-03-21 21:15

from django.db import migrations


def forward_func(apps, schema_editor):
    for dv in apps.get_model("landmatrix", "DealVersion").objects.all():
        print(dv.serialized_data["modified_at"])
        dv.modified_at = dv.serialized_data["modified_at"]
        dv.modified_by_id = dv.serialized_data["modified_by"]
        dv.save()

    for iv in apps.get_model("landmatrix", "InvestorVersion").objects.all():
        print(iv.serialized_data["modified_at"])
        iv.modified_at = iv.serialized_data["modified_at"]
        iv.modified_by_id = iv.serialized_data["modified_by"]
        iv.save()

def backward_func(apps, schema_editor):
    pass


class Migration(migrations.Migration):

    dependencies = [
        ('landmatrix', '0050_auto_20220304_1049'),
    ]

    operations = [
        migrations.RunPython(forward_func, backward_func)
    ]
