text: # Generated by Django 2.2.5 on 2019-11-04 05:45
  
  import autoslug.fields
  import cities_light.abstract_models
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='City',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(db_index=True, max_length=200)),
                  ('name_ascii', models.CharField(blank=True, db_index=True, max_length=200)),
                  ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name_ascii')),
                  ('geoname_id', models.IntegerField(blank=True, null=True, unique=True)),
                  ('alternate_names', models.TextField(blank=True, default='', null=True)),
                  ('display_name', models.CharField(max_length=200)),
                  ('search_names', cities_light.abstract_models.ToSearchTextField(blank=True, db_index=True, default='', max_length=4000)),
                  ('latitude', models.DecimalField(blank=True, decimal_places=5, max_digits=8, null=True)),
                  ('longitude', models.DecimalField(blank=True, decimal_places=5, max_digits=8, null=True)),
                  ('population', models.BigIntegerField(blank=True, db_index=True, null=True)),
                  ('feature_code', models.CharField(blank=True, db_index=True, max_length=10, null=True)),
                  ('timezone', models.CharField(max_length=40)),
              ],
              options={
                  'verbose_name_plural': 'cities',
                  'ordering': ['name'],
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Country',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(db_index=True, max_length=200)),
                  ('name_ascii', models.CharField(blank=True, db_index=True, max_length=200)),
                  ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name_ascii')),
                  ('geoname_id', models.IntegerField(blank=True, null=True, unique=True)),
                  ('alternate_names', models.TextField(blank=True, default='', null=True)),
                  ('code2', models.CharField(blank=True, max_length=2, null=True, unique=True)),
                  ('code3', models.CharField(blank=True, max_length=3, null=True, unique=True)),
                  ('continent', models.CharField(choices=[('OC', 'Oceania'), ('EU', 'Europe'), ('AF', 'Africa'), ('NA', 'North America'), ('AN', 'Antarctica'), ('SA', 'South America'), ('AS', 'Asia')], db_index=True, max_length=2)),
                  ('tld', models.CharField(blank=True, db_index=True, max_length=5)),
                  ('phone', models.CharField(blank=True, max_length=20, null=True)),
              ],
              options={
                  'verbose_name_plural': 'countries',
                  'ordering': ['name'],
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Region',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(db_index=True, max_length=200)),
                  ('name_ascii', models.CharField(blank=True, db_index=True, max_length=200)),
                  ('slug', autoslug.fields.AutoSlugField(editable=False, populate_from='name_ascii')),
                  ('geoname_id', models.IntegerField(blank=True, null=True, unique=True)),
                  ('alternate_names', models.TextField(blank=True, default='', null=True)),
                  ('display_name', models.CharField(max_length=200)),
                  ('geoname_code', models.CharField(blank=True, db_index=True, max_length=50, null=True)),
                  ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='landing.Country')),
              ],
              options={
                  'verbose_name': 'region/state',
                  'verbose_name_plural': 'regions/states',
                  'ordering': ['name'],
                  'abstract': False,
                  'unique_together': {('country', 'slug'), ('country', 'name')},
              },
          ),
          migrations.CreateModel(
              name='Profile',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('dob', models.DateField(blank=True, help_text='Your date of birth', null=True)),
                  ('gender', models.CharField(blank=True, choices=[('m', 'Male'), ('f', 'Female'), ('o', 'Other'), ('n', 'Not Specified')], max_length=9, null=True)),
                  ('mail_notifications_allowed', models.BooleanField(default=True, help_text='Get all your notifications via mail')),
                  ('newsletter', models.BooleanField(default=True, help_text='Get notifications our new services and features')),
                  ('use_gravtar', models.BooleanField(default=False, help_text='One avatar to rule them all!')),
                  ('beta_user', models.BooleanField(default=False, help_text='Test and help us find bugs in our unreleased features')),
                  ('avatar', models.URLField(blank=True, help_text='Profile picture URL', null=True)),
                  ('avatar_small', models.URLField(blank=True, help_text='Profile picture smaller URL', null=True)),
                  ('email_confirmed', models.BooleanField(default=False)),
                  ('city', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='landing.City')),
                  ('country', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='landing.Country')),
                  ('state', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='landing.Region')),
                  ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'verbose_name': 'Profile',
                  'verbose_name_plural': 'Profiles',
                  'ordering': ('user',),
              },
          ),
          migrations.AddField(
              model_name='city',
              name='country',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='landing.Country'),
          ),
          migrations.AddField(
              model_name='city',
              name='region',
              field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='landing.Region'),
          ),
          migrations.AlterUniqueTogether(
              name='city',
              unique_together={('region', 'name'), ('region', 'slug')},
          ),
      ]
  