# Generated by Django 2.2.13 on 2020-07-13 17:19
from django.db import migrations


def forward(apps, schema_editor):
    EnforcementActionStatus = apps.get_model('v1', 'EnforcementActionStatus')
    for existing, updated in (
        ('Expired/Terminated/Dismissed', 'expired-terminated-dismissed'),
        ('Pending Litigation', 'pending-litigation'),
        ('Post Order/Post Judgment', 'post-order-post-judgment'),
    ):
        statuses = EnforcementActionStatus.objects.filter(status=existing)
        for status in statuses:
            status.status = updated

        EnforcementActionStatus.objects.bulk_update(statuses, ['status'])


def backward(apps, schema_editor):
    raise NotImplementedError


class Migration(migrations.Migration):

    dependencies = [
        ('v1', '0225_enforcement_status_filter'),
    ]

    operations = [
        migrations.RunPython(forward, backward),
    ]

# Generated by Django 2.2.13 on 2020-07-13 17:19
from django.db import migrations


def forward(apps, schema_editor):
    EnforcementActionStatus = apps.get_model('v1', 'EnforcementActionStatus')
    for existing, updated in (
        ('Expired/Terminated/Dismissed', 'expired-terminated-dismissed'),
        ('Pending Litigation', 'pending-litigation'),
        ('Post Order/Post Judgment', 'post-order-post-judgment'),
    ):
        statuses = EnforcementActionStatus.objects.filter(status=existing)
        for status in statuses:
            status.status = updated

        EnforcementActionStatus.objects.bulk_update(statuses, ['status'])


def backward(apps, schema_editor):
    raise NotImplementedError


class Migration(migrations.Migration):

    dependencies = [
        ('v1', '0225_enforcement_status_filter'),
    ]

    operations = [
        migrations.RunPython(forward, backward),
    ]

# Generated by Django 2.2.13 on 2020-07-13 17:19