# Generated by Django 5.0.6 on 2024-08-07 09:43

from django.db import migrations, models
from django.db.models import F


def populate_first_name_last_name(apps, schema_editor):
    Mailbox = apps.get_model('mailbox_manager', 'Mailbox')
    Mailbox.objects.filter(first_name='').update(first_name=F("local_part"))
    Mailbox.objects.filter(last_name='').update(last_name=F("local_part"))


class Migration(migrations.Migration):

    dependencies = [
        ('mailbox_manager', '0008_mailbox_first_name_mailbox_last_name'),
    ]

    operations = [
        migrations.RunPython(populate_first_name_last_name, reverse_code=migrations.RunPython.noop),

    ]
