# Generated by Django 3.1.7 on 2021-03-04 18:29

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='country', to='alabuga.country')),
                ('reg_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='alabuga.region')),
            ],
        ),
        migrations.CreateModel(
            name='Geographic_Quality_Mark',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mark_name', models.CharField(max_length=128, verbose_name='mark name')),
                ('obj_id', models.CharField(blank=True, max_length=64, null=True)),
                ('c_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('region', models.ManyToManyField(related_name='region_quality_mark', to='alabuga.Region')),
            ],
        ),
        migrations.CreateModel(
            name='SubRegion',
            fields=[
            ],
            options={
                'proxy': True,
                'indexes': [],
                'constraints': [],
            },
            bases=('alabuga.region',),
        ),
        migrations.CreateModel(
            name='Main',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='main_country', to='alabuga.country')),
                ('mark', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='main_mark', to='alabuga.geographic_quality_mark')),
                ('region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='main_region', to='alabuga.region')),
                ('sub_region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='main_sub_region', to='alabuga.subregion')),
            ],
        ),
        migrations.AddField(
            model_name='geographic_quality_mark',
            name='sub_region',
            field=models.ManyToManyField(related_name='sub_region_quality_mark', to='alabuga.SubRegion'),
        ),
    ]
