# Generated by Django 2.2.4 on 2019-11-30 18:11

from django.db import migrations


def copy_owners(apps, schema_editor):
    Flat = apps.get_model('property', 'Flat')
    Owner = apps.get_model('property', 'Owner')

    for flat in Flat.objects.all():
        Owner.objects.get_or_create(
            owner=flat.owner, owners_phonenumber=flat.owners_phonenumber, owner_phone_pure=flat.owner_phone_pure)


class Migration(migrations.Migration):

    dependencies = [
        ('property', '0011_auto_20191130_1028'),
    ]

    operations = [

        migrations.RunPython(copy_owners)
    ]
