# Generated by Django 3.2.7 on 2021-09-13 09:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Constituency',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the constituency')),
            ],
        ),
        migrations.CreateModel(
            name='County',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('county_code', models.CharField(max_length=50, unique=True, verbose_name='Identifies the county code')),
                ('county_name', models.CharField(max_length=100, verbose_name='Name of the county')),
                ('province', models.CharField(max_length=100, verbose_name='Province that a county belongs to')),
            ],
        ),
        migrations.CreateModel(
            name='Division',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the division')),
                ('constituency', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.constituency', verbose_name='constituency')),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the location')),
                ('division', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.division', verbose_name='division')),
            ],
        ),
        migrations.CreateModel(
            name='SubLocation',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the sub location')),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.location', verbose_name='location')),
            ],
        ),
        migrations.CreateModel(
            name='SubCounty',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('sub_county_code', models.CharField(max_length=50, verbose_name='Code of the sub county')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the sub county')),
                ('county', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.county', verbose_name='county')),
            ],
        ),
        migrations.AddField(
            model_name='constituency',
            name='sub_county',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.subcounty', verbose_name='sub_county'),
        ),
    ]

# Generated by Django 3.2.7 on 2021-09-13 09:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Constituency',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the constituency')),
            ],
        ),
        migrations.CreateModel(
            name='County',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('county_code', models.CharField(max_length=50, unique=True, verbose_name='Identifies the county code')),
                ('county_name', models.CharField(max_length=100, verbose_name='Name of the county')),
                ('province', models.CharField(max_length=100, verbose_name='Province that a county belongs to')),
            ],
        ),
        migrations.CreateModel(
            name='Division',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the division')),
                ('constituency', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.constituency', verbose_name='constituency')),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the location')),
                ('division', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.division', verbose_name='division')),
            ],
        ),
        migrations.CreateModel(
            name='SubLocation',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the sub location')),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.location', verbose_name='location')),
            ],
        ),
        migrations.CreateModel(
            name='SubCounty',
            fields=[
                ('guid', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, verbose_name='guid as a primary key')),
                ('sub_county_code', models.CharField(max_length=50, verbose_name='Code of the sub county')),
                ('name', models.CharField(max_length=100, verbose_name='Name of the sub county')),
                ('county', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.county', verbose_name='county')),
            ],
        ),
        migrations.AddField(
            model_name='constituency',
            name='sub_county',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.subcounty', verbose_name='sub_county'),
        ),
    ]

# Generated by Django 3.2.7 on 2021-09-13 09:03