# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-16 16:25
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('homes', '0008_auto_20170816_1607'),
    ]

    operations = [
        migrations.CreateModel(
            name='Council',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=127)),
            ],
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.CharField(max_length=200)),
                ('credit', models.CharField(max_length=200)),
                ('description', models.CharField(max_length=800)),
            ],
        ),
        migrations.CreateModel(
            name='Property',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('address1', models.CharField(default=models.CharField(max_length=255), max_length=255)),
                ('address2', models.CharField(max_length=255)),
                ('address3', models.CharField(max_length=255)),
                ('town', models.CharField(max_length=31)),
                ('region', models.CharField(max_length=31)),
                ('postcode', models.CharField(max_length=31)),
                ('lat', models.DecimalField(decimal_places=6, max_digits=8)),
                ('lng', models.DecimalField(decimal_places=6, max_digits=9)),
                ('bedrooms', models.IntegerField(default=1)),
                ('beds', models.IntegerField(default=1)),
                ('max_occupants', models.IntegerField(default=1)),
                ('rent_pcm', models.DecimalField(decimal_places=2, max_digits=7)),
                ('deposit', models.DecimalField(decimal_places=2, max_digits=7)),
                ('units', models.IntegerField(default=1)),
                ('council', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='homes.Council')),
            ],
        ),
        migrations.CreateModel(
            name='PropertyType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ptype', models.CharField(max_length=31)),
            ],
        ),
        migrations.CreateModel(
            name='Provider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=127)),
            ],
        ),
        migrations.CreateModel(
            name='Support',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('support', models.CharField(max_length=31)),
            ],
        ),
        migrations.RemoveField(
            model_name='bread',
            name='grain',
        ),
        migrations.DeleteModel(
            name='Bread',
        ),
        migrations.DeleteModel(
            name='Grain',
        ),
        migrations.AddField(
            model_name='property',
            name='provider',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='homes.Provider'),
        ),
        migrations.AddField(
            model_name='property',
            name='ptype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='homes.PropertyType'),
        ),
        migrations.AddField(
            model_name='property',
            name='support',
            field=models.ManyToManyField(to='homes.Support'),
        ),
        migrations.AddField(
            model_name='photo',
            name='prop',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='homes.Property'),
        ),
    ]
