# Generated by Django 3.1.3 on 2021-03-04 05:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='LocalRegion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'local_regions',
            },
        ),
        migrations.CreateModel(
            name='MetroRegion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True)),
            ],
            options={
                'db_table': 'metro_regions',
            },
        ),
        migrations.CreateModel(
            name='PlaceType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True)),
            ],
            options={
                'db_table': 'place_types',
            },
        ),
        migrations.CreateModel(
            name='Place',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('road_address', models.CharField(max_length=50)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(null=True)),
                ('place_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='place.placetype')),
                ('region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='place.localregion')),
            ],
            options={
                'db_table': 'places',
            },
        ),
        migrations.AddField(
            model_name='localregion',
            name='metro_region',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='place.metroregion'),
        ),
    ]
