# Generated by Django 2.2.dev20190130093405 on 2019-01-31 04:01

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


class Migration(migrations.Migration):

    dependencies = [
        ('naturalkey', '0004_auto_20190131_0258'),
    ]

    operations = [
        migrations.CreateModel(
            name='CountryModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True, verbose_name='国家')),
                ('abbreviation', models.CharField(db_index=True, default='', max_length=64, verbose_name='缩写')),
            ],
        ),
        migrations.CreateModel(
            name='StateModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, verbose_name='州')),
                ('abbreviation', models.CharField(db_index=True, default='', max_length=64, verbose_name='缩写')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='naturalkey.CountryModel')),
            ],
        ),
        migrations.CreateModel(
            name='CityModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True, verbose_name='市')),
                ('state', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='naturalkey.StateModel')),
            ],
            options={
                'unique_together': {('state', 'name')},
            },
        ),
    ]
