# Path: cities/models.py
# def SET_NULL_OR_CASCADE(collector, field, sub_objs, using):
#     if field.null is True:
#         models.SET_NULL(collector, field, sub_objs, using)
#     else:
#         models.CASCADE(collector, field, sub_objs, using)


from django.db import models, migrations
from cities.models import SET_NULL_OR_CASCADE
import django.contrib.gis.db.models.fields
import swapper
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PostalCode',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=200, verbose_name='ascii name', db_index=True)),
                ('slug', models.CharField(max_length=200)),
                ('code', models.CharField(max_length=20)),
                ('location', django.contrib.gis.db.models.fields.PointField(srid=4326)),
                ('region_name', models.CharField(max_length=100, db_index=True)),
                ('subregion_name', models.CharField(max_length=100, db_index=True)),
                ('district_name', models.CharField(max_length=100, db_index=True)),
                ('alt_names', models.ManyToManyField(to='cities.AlternativeName')),
                ('country', models.ForeignKey(related_name='postal_codes', to=swapper.get_model_name('cities', 'Country'), on_delete=SET_NULL_OR_CASCADE)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=200, verbose_name='ascii name', db_index=True)),
                ('slug', models.CharField(max_length=200)),
                ('name_std', models.CharField(max_length=200, verbose_name='standard name', db_index=True)),
                ('code', models.CharField(max_length=200, db_index=True)),
                ('alt_names', models.ManyToManyField(to='cities.AlternativeName')),

# Path: cities/models.py
# def SET_NULL_OR_CASCADE(collector, field, sub_objs, using):
#     if field.null is True:
#         models.SET_NULL(collector, field, sub_objs, using)
#     else:
#         models.CASCADE(collector, field, sub_objs, using)


# Path: cities/migrations/0001_initial.py
from django.db import models, migrations
from cities.models import SET_NULL_OR_CASCADE
import django.contrib.gis.db.models.fields
import swapper

                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PostalCode',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=200, verbose_name='ascii name', db_index=True)),
                ('slug', models.CharField(max_length=200)),
                ('code', models.CharField(max_length=20)),
                ('location', django.contrib.gis.db.models.fields.PointField(srid=4326)),
                ('region_name', models.CharField(max_length=100, db_index=True)),
                ('subregion_name', models.CharField(max_length=100, db_index=True)),
                ('district_name', models.CharField(max_length=100, db_index=True)),
                ('alt_names', models.ManyToManyField(to='cities.AlternativeName')),
                ('country', models.ForeignKey(related_name='postal_codes', to=swapper.get_model_name('cities', 'Country'), on_delete=SET_NULL_OR_CASCADE)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=200, verbose_name='ascii name', db_index=True)),
                ('slug', models.CharField(max_length=200)),
                ('name_std', models.CharField(max_length=200, verbose_name='standard name', db_index=True)),
                ('code', models.CharField(max_length=200, db_index=True)),
                ('alt_names', models.ManyToManyField(to='cities.AlternativeName')),

                ('country', models.ForeignKey(to=swapper.get_model_name('cities', 'Country'), on_delete=SET_NULL_OR_CASCADE)),