# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-12-07 00:03
from __future__ import unicode_literals

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('prop', '0034_auto_20161204_2040'),
    ]

    operations = [
        migrations.CreateModel(
            name='Parcel_Policy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('area', models.DecimalField(decimal_places=4, max_digits=20, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Parcel_Zone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('area', models.DecimalField(decimal_places=4, max_digits=20, null=True)),
            ],
        ),
        migrations.RemoveField(
            model_name='parcel_policybound',
            name='parcel',
        ),
        migrations.RemoveField(
            model_name='parcel_policybound',
            name='policybound',
        ),
        migrations.RemoveField(
            model_name='parcel_zonebound',
            name='parcel',
        ),
        migrations.RemoveField(
            model_name='parcel_zonebound',
            name='zonebound',
        ),
        migrations.RemoveField(
            model_name='policybound',
            name='policy',
        ),
        migrations.RemoveField(
            model_name='zonebound',
            name='zone',
        ),
        migrations.RemoveField(
            model_name='lot',
            name='geom',
        ),
        migrations.RemoveField(
            model_name='parcel',
            name='policybound',
        ),
        migrations.RemoveField(
            model_name='parcel',
            name='zonebound',
        ),
        migrations.AddField(
            model_name='policy',
            name='geom',
            field=django.contrib.gis.db.models.fields.MultiPolygonField(null=True, srid=4326),
        ),
        migrations.AddField(
            model_name='zone',
            name='geom',
            field=django.contrib.gis.db.models.fields.MultiPolygonField(null=True, srid=4326),
        ),
        migrations.DeleteModel(
            name='Parcel_Policybound',
        ),
        migrations.DeleteModel(
            name='Parcel_Zonebound',
        ),
        migrations.DeleteModel(
            name='Policybound',
        ),
        migrations.DeleteModel(
            name='Zonebound',
        ),
        migrations.AddField(
            model_name='parcel_zone',
            name='parcel',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='prop.Parcel'),
        ),
        migrations.AddField(
            model_name='parcel_zone',
            name='zone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='prop.Zone'),
        ),
        migrations.AddField(
            model_name='parcel_policy',
            name='parcel',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='prop.Parcel'),
        ),
        migrations.AddField(
            model_name='parcel_policy',
            name='policy',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='prop.Policy'),
        ),
        migrations.AddField(
            model_name='parcel',
            name='policy',
            field=models.ManyToManyField(blank=True, through='prop.Parcel_Policy', to='prop.Policy'),
        ),
        migrations.AddField(
            model_name='parcel',
            name='zone',
            field=models.ManyToManyField(blank=True, through='prop.Parcel_Zone', to='prop.Zone'),
        ),
    ]
