# Generated by Django 3.2.18 on 2023-04-07 11:13

from django.db import migrations, models


def migrate_organizationmember_status_blocked_to_blocked_attribute(apps, schema_editor):
    OrganizationMember = apps.get_model("tools", "OrganizationMember")
    OrganizationMember.objects.filter(status="blocked").update(status="active", blocked=True)


class Migration(migrations.Migration):
    dependencies = [("tools", "0032_alter_organizationmember_user")]

    operations = [
        migrations.AddField(model_name="organizationmember", name="blocked", field=models.BooleanField(default=False)),
        migrations.RunPython(migrate_organizationmember_status_blocked_to_blocked_attribute),
        migrations.AlterField(
            model_name="organizationmember",
            name="status",
            field=models.CharField(choices=[("active", "active"), ("new", "new")], default="new", max_length=64),
        ),
    ]
