# Generated by Django 2.1.1 on 2018-09-17 09:21

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=20)),
                ('name_kana', models.CharField(max_length=50)),
                ('lat', models.DecimalField(decimal_places=6, default=0, max_digits=9)),
                ('lon', models.DecimalField(decimal_places=6, default=0, max_digits=9)),
            ],
            options={
                'db_table': 'cities',
            },
        ),
        migrations.CreateModel(
            name='Prefecture',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=20)),
                ('name_kana', models.CharField(max_length=50)),
                ('lat', models.DecimalField(decimal_places=6, default=0, max_digits=9)),
                ('lon', models.DecimalField(decimal_places=6, default=0, max_digits=9)),
            ],
            options={
                'db_table': 'prefectures',
            },
        ),
        migrations.CreateModel(
            name='CityAppend',
            fields=[
                ('city', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='locations.City')),
                ('ta_area_id', models.CharField(max_length=255, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('finish', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'city_appends',
            },
        ),
        migrations.CreateModel(
            name='PrefectureAppend',
            fields=[
                ('prefecture', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='locations.Prefecture')),
                ('base_id', models.CharField(max_length=255, unique=True)),
            ],
            options={
                'db_table': 'prefecture_appends',
            },
        ),
        migrations.AddField(
            model_name='city',
            name='prefecture',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='locations.Prefecture'),
        ),
    ]
