# Generated by Django 4.2 on 2023-05-09 22:20

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='County',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('county', models.CharField(max_length=50)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'County/Municipality',
                'verbose_name_plural': 'County/Municipality',
            },
        ),
        migrations.CreateModel(
            name='Regions',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('region', models.CharField(max_length=20)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Region',
                'verbose_name_plural': 'Region',
            },
        ),
        migrations.CreateModel(
            name='SubCounty',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('sub_county', models.CharField(max_length=50)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('county', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='districts.county')),
            ],
            options={
                'verbose_name': 'Sub-County/Town Council/Division',
                'verbose_name_plural': 'Sub-County/Town Council/Division',
            },
        ),
        migrations.CreateModel(
            name='Parish',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('parish', models.CharField(max_length=50)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('sub_county', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='districts.subcounty')),
            ],
            options={
                'verbose_name': 'Parish/Ward',
                'verbose_name_plural': 'Parish/Ward',
            },
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('parish', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='districts.parish')),
            ],
            options={
                'verbose_name': 'Location',
                'verbose_name_plural': 'Location',
            },
        ),
        migrations.CreateModel(
            name='Districts',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('district', models.CharField(max_length=50)),
                ('population', models.IntegerField()),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='districts.regions')),
            ],
            options={
                'verbose_name': 'District/City',
                'verbose_name_plural': 'District/City',
            },
        ),
        migrations.AddField(
            model_name='county',
            name='district',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='districts.districts'),
        ),
    ]
