# Generated by Django 2.2.19 on 2021-03-03 15:23

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Country",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("iso2", models.CharField(max_length=2, unique=True, verbose_name="ISO 3166-1 Alpha 2 Name")),
                ("iso3", models.CharField(max_length=3, unique=True, verbose_name="ISO 3166-1 Alpha 3 Name")),
                ("name", models.CharField(max_length=128, unique=True, verbose_name="Country Name")),
            ],
            options={
                "verbose_name": "Country",
                "verbose_name_plural": "Countries",
                "ordering": ("iso2", "name"),
            },
        ),
        migrations.CreateModel(
            name="Territory",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("abbr", models.CharField(max_length=10, verbose_name="Territory Abbreviation")),
                ("name", models.CharField(max_length=128, verbose_name="Territory Name")),
                (
                    "country",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, related_name="territories", to="locality.Country"
                    ),
                ),
            ],
            options={
                "verbose_name": "Territory",
                "verbose_name_plural": "Territories",
                "ordering": ("abbr", "name"),
            },
        ),
    ]
