text: # Generated by Django 2.2.4 on 2019-08-16 15:27
  
  import django.contrib.postgres.fields
  import django.contrib.postgres.fields.jsonb
  from django.db import migrations, models
  import django.db.models.deletion
  import django.utils.timezone
  import model_utils.fields
  import phonenumber_field.modelfields
  import uuid
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='CleanPanelist',
              fields=[
                  ('id', models.IntegerField(editable=False, primary_key=True, serialize=False)),
                  ('year', models.IntegerField()),
                  ('season', models.IntegerField(choices=[(1, 'Summer'), (2, 'Midwinter'), (3, 'Fall'), (4, 'Spring')])),
                  ('district', models.CharField(max_length=255)),
                  ('convention', models.CharField(max_length=255)),
                  ('session', models.IntegerField(choices=[(32, 'Chorus'), (41, 'Quartet'), (42, 'Mixed'), (43, 'Senior'), (44, 'Youth'), (45, 'Unknown'), (46, 'VLQ')])),
                  ('round', models.IntegerField(choices=[(1, 'Finals'), (2, 'Semi-Finals'), (3, 'Quarter-Finals')])),
                  ('category', models.IntegerField(choices=[(30, 'Music'), (40, 'Performance'), (50, 'Singing')])),
                  ('num', models.IntegerField()),
                  ('legacy_person', models.CharField(max_length=255)),
                  ('scores', django.contrib.postgres.fields.jsonb.JSONField()),
                  ('panelist_id', models.UUIDField(blank=True, null=True)),
              ],
          ),
          migrations.CreateModel(
              name='CleanSong',
              fields=[
                  ('id', models.IntegerField(editable=False, primary_key=True, serialize=False)),
                  ('year', models.IntegerField()),
                  ('season', models.IntegerField(choices=[(1, 'Summer'), (2, 'Midwinter'), (3, 'Fall'), (4, 'Spring')])),
                  ('district', models.CharField(max_length=255)),
                  ('convention', models.CharField(max_length=255)),
                  ('session', models.IntegerField(choices=[(32, 'Chorus'), (41, 'Quartet'), (42, 'Mixed'), (43, 'Senior'), (44, 'Youth'), (45, 'Unknown'), (46, 'VLQ')])),
                  ('round', models.IntegerField(choices=[(1, 'Finals'), (2, 'Semi-Finals'), (3, 'Quarter-Finals')])),
                  ('appearance_num', models.IntegerField()),
                  ('song_num', models.IntegerField()),
                  ('legacy_group', models.CharField(max_length=255)),
                  ('legacy_chart', models.CharField(max_length=255)),
                  ('scores', django.contrib.postgres.fields.jsonb.JSONField()),
                  ('appearance_id', models.UUIDField(blank=True, null=True)),
                  ('song_id', models.UUIDField(blank=True, null=True)),
              ],
          ),
          migrations.CreateModel(
              name='Complete',
              fields=[
                  ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('row_id', models.IntegerField(blank=True, null=True)),
                  ('year', models.IntegerField(blank=True, null=True)),
                  ('season_kind', models.IntegerField(blank=True, choices=[(1, 'Summer'), (2, 'Midwinter'), (3, 'Fall'), (4, 'Spring')], null=True)),
                  ('district_code', models.CharField(blank=True, max_length=255)),
                  ('convention_name', models.CharField(blank=True, max_length=255)),
                  ('session_kind', models.IntegerField(blank=True, choices=[(32, 'Chorus'), (41, 'Quartet'), (42, 'Mixed'), (43, 'Senior'), (44, 'Youth'), (45, 'Unknown'), (46, 'VLQ')], null=True)),
                  ('round_kind', models.IntegerField(blank=True, choices=[(1, 'Finals'), (2, 'Semi-Finals'), (3, 'Quarter-Finals')], null=True)),
                  ('category_kind', models.IntegerField(blank=True, choices=[(30, 'Music'), (40, 'Performance'), (50, 'Singing')], null=True)),
                  ('points', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(blank=True, null=True), blank=True, null=True, size=None)),
                  ('person_id', models.UUIDField(blank=True, null=True)),
                  ('panelist_id', models.UUIDField(blank=True, null=True)),
              ],
          ),
          migrations.CreateModel(
              name='Group',
              fields=[
                  ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                  ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                  ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('name', models.CharField(default='UNKNOWN', help_text='\n            The name of the resource.\n        ', max_length=255)),
                  ('kind', models.IntegerField(choices=[('International', [(1, 'International')]), ('District', [(11, 'District'), (12, 'Noncompetitive'), (13, 'Affiliate')]), ('Chapter', [(30, 'Chapter')]), ('Group', [(32, 'Chorus'), (41, 'Quartet'), (46, 'VLQ')])], help_text='\n            The kind of group.\n        ')),
                  ('gender', models.IntegerField(choices=[(10, 'Male'), (20, 'Female'), (30, 'Mixed')], default=10, help_text='\n            The gender of group.\n        ')),
                  ('division', models.IntegerField(blank=True, choices=[('EVG', [(10, 'EVG Division I'), (20, 'EVG Division II'), (30, 'EVG Division III'), (40, 'EVG Division IV'), (50, 'EVG Division V')]), ('FWD', [(60, 'FWD Arizona'), (70, 'FWD Northeast'), (80, 'FWD Northwest'), (90, 'FWD Southeast'), (100, 'FWD Southwest')]), ('LOL', [(110, 'LOL 10000 Lakes'), (120, 'LOL Division One'), (130, 'LOL Northern Plains'), (140, 'LOL Packerland'), (150, 'LOL Southwest')]), ('MAD', [(170, 'MAD Central'), (180, 'MAD Northern'), (190, 'MAD Southern')]), ('NED', [(210, 'NED Granite and Pine'), (220, 'NED Mountain'), (230, 'NED Patriot'), (240, 'NED Sunrise'), (250, 'NED Yankee')]), ('SWD', [(260, 'SWD Northeast'), (270, 'SWD Northwest'), (280, 'SWD Southeast'), (290, 'SWD Southwest')])], null=True)),
                  ('bhs_id', models.IntegerField(blank=True, null=True, unique=True)),
                  ('code', models.CharField(blank=True, help_text='\n            Short-form code.', max_length=255)),
                  ('website', models.URLField(blank=True, default='', help_text='\n            The website URL of the resource.')),
                  ('email', models.EmailField(blank=True, help_text='\n            The contact email of the resource.', max_length=254, null=True)),
                  ('phone', models.CharField(blank=True, help_text='\n            The phone number of the resource.  Include country code.', max_length=25)),
                  ('fax_phone', models.CharField(blank=True, help_text='\n            The fax number of the resource.  Include country code.', max_length=25)),
                  ('start_date', models.DateField(blank=True, null=True)),
                  ('end_date', models.DateField(blank=True, null=True)),
                  ('location', models.CharField(blank=True, help_text='\n            The geographical location of the resource.', max_length=255)),
                  ('facebook', models.URLField(blank=True, help_text='\n            The facebook URL of the resource.')),
                  ('twitter', models.URLField(blank=True, help_text='\n            The twitter URL of the resource.')),
                  ('youtube', models.URLField(blank=True, default='', help_text='\n            The youtube URL of the resource.')),
                  ('pinterest', models.URLField(blank=True, default='', help_text='\n            The pinterest URL of the resource.')),
                  ('flickr', models.URLField(blank=True, default='', help_text='\n            The flickr URL of the resource.')),
                  ('instagram', models.URLField(blank=True, default='', help_text='\n            The instagram URL of the resource.')),
                  ('soundcloud', models.URLField(blank=True, default='', help_text='\n            The soundcloud URL of the resource.')),
                  ('image', models.URLField(blank=True, default='', max_length=255)),
                  ('description', models.TextField(blank=True, help_text='\n            A description of the group.  Max 1000 characters.', max_length=1000)),
                  ('participants', models.CharField(blank=True, default='', help_text='Director(s) or Members (listed TLBB)', max_length=255)),
                  ('notes', models.TextField(blank=True, help_text='\n            Notes (for internal use only).')),
                  ('international', models.TextField(blank=True, help_text='\n            The denormalized international group.', max_length=255)),
                  ('district', models.TextField(blank=True, help_text='\n            The denormalized district group.', max_length=255)),
                  ('chapter', models.TextField(blank=True, help_text='\n            The denormalized chapter group.', max_length=255)),
              ],
              options={
                  'verbose_name_plural': 'Groups',
              },
          ),
          migrations.CreateModel(
              name='Person',
              fields=[
                  ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                  ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                  ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('status', models.IntegerField(choices=[(-10, 'Inactive'), (0, 'New'), (10, 'Active')], default=10, help_text='DO NOT CHANGE MANUALLY unless correcting a mistake.  Use the buttons to change state.')),
                  ('prefix', models.CharField(blank=True, default='', help_text='\n            The prefix of the person.', max_length=255)),
                  ('first_name', models.CharField(editable=False, help_text='\n            The first name of the person.', max_length=255)),
                  ('middle_name', models.CharField(editable=False, help_text='\n            The middle name of the person.', max_length=255)),
                  ('last_name', models.CharField(editable=False, help_text='\n            The last name of the person.', max_length=255)),
                  ('nick_name', models.CharField(editable=False, help_text='\n            The nickname of the person.', max_length=255)),
                  ('suffix', models.CharField(blank=True, default='', help_text='\n            The suffix of the person.', max_length=255)),
                  ('birth_date', models.DateField(editable=False, null=True)),
                  ('spouse', models.CharField(blank=True, default='', max_length=255)),
                  ('location', models.CharField(blank=True, default='', help_text='\n            The geographical location of the resource.', max_length=255)),
                  ('part', models.IntegerField(choices=[(1, 'Tenor'), (2, 'Lead'), (3, 'Baritone'), (4, 'Bass')], editable=False, null=True)),
                  ('mon', models.IntegerField(editable=False, help_text='\n            Men of Note.', null=True)),
                  ('gender', models.IntegerField(choices=[(10, 'Male'), (20, 'Female')], editable=False, null=True)),
                  ('district', models.CharField(blank=True, default='', help_text='\n            District (used primarily for judges.)', max_length=10)),
                  ('is_deceased', models.BooleanField(default=False, editable=False)),
                  ('is_honorary', models.BooleanField(default=False, editable=False)),
                  ('is_suspended', models.BooleanField(default=False, editable=False)),
                  ('is_expelled', models.BooleanField(default=False, editable=False)),
                  ('website', models.URLField(blank=True, default='', help_text='\n            The website URL of the resource.')),
                  ('email', models.EmailField(editable=False, help_text='\n            The contact email of the resource.', max_length=254, null=True)),
                  ('address', models.TextField(blank=True, default='', help_text='\n            The complete address of the resource.', max_length=1000)),
                  ('home_phone', phonenumber_field.modelfields.PhoneNumberField(editable=False, help_text='\n            The home phone number of the resource.  Include country code.', max_length=128, region=None)),
                  ('work_phone', phonenumber_field.modelfields.PhoneNumberField(editable=False, help_text='\n            The work phone number of the resource.  Include country code.', max_length=128, region=None)),
                  ('cell_phone', phonenumber_field.modelfields.PhoneNumberField(editable=False, help_text='\n            The cell phone number of the resource.  Include country code.', max_length=128, region=None)),
                  ('airports', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=3), blank=True, null=True, size=None)),
                  ('image', models.URLField(blank=True, max_length=255)),
                  ('description', models.TextField(blank=True, default='', help_text='\n            A bio of the person.  Max 1000 characters.', max_length=1000)),
                  ('notes', models.TextField(blank=True, default='', help_text='\n            Notes (for internal use only).')),
                  ('bhs_id', models.IntegerField(editable=False)),
                  ('mc_pk', models.CharField(blank=True, db_index=True, max_length=36, null=True, unique=True)),
              ],
              options={
                  'verbose_name_plural': 'Persons',
              },
          ),
          migrations.CreateModel(
              name='RawPanelist',
              fields=[
                  ('id', models.IntegerField(editable=False, primary_key=True, serialize=False)),
                  ('year', models.IntegerField()),
                  ('season', models.CharField(max_length=255)),
                  ('district', models.CharField(max_length=255)),
                  ('convention', models.CharField(max_length=255)),
                  ('session', models.CharField(max_length=255)),
                  ('round', models.CharField(max_length=255)),
                  ('category', models.CharField(max_length=255)),
                  ('num', models.IntegerField(blank=True, null=True)),
                  ('judge', models.CharField(max_length=255)),
                  ('scores', django.contrib.postgres.fields.jsonb.JSONField()),
              ],
          ),
          migrations.CreateModel(
              name='RawSong',
              fields=[
                  ('id', models.IntegerField(editable=False, primary_key=True, serialize=False)),
                  ('season', models.CharField(max_length=255)),
                  ('year', models.IntegerField()),
                  ('district', models.CharField(max_length=255)),
                  ('event', models.CharField(max_length=255)),
                  ('session', models.CharField(max_length=255)),
                  ('group_name', models.CharField(max_length=255)),
                  ('appearance_num', models.IntegerField()),
                  ('song_num', models.IntegerField()),
                  ('song_title', models.CharField(max_length=255)),
                  ('totals', models.IntegerField()),
                  ('scores', django.contrib.postgres.fields.jsonb.JSONField()),
              ],
          ),
          migrations.CreateModel(
              name='Selection',
              fields=[
                  ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('mark', models.BooleanField(default=False)),
                  ('row_id', models.IntegerField(blank=True, null=True)),
                  ('year', models.IntegerField(blank=True, null=True)),
                  ('season_kind', models.IntegerField(blank=True, choices=[(1, 'Summer'), (2, 'Midwinter'), (3, 'Fall'), (4, 'Spring')], null=True)),
                  ('district_code', models.CharField(blank=True, max_length=255)),
                  ('convention_name', models.CharField(blank=True, max_length=255)),
                  ('session_kind', models.IntegerField(blank=True, choices=[(32, 'Chorus'), (41, 'Quartet'), (42, 'Mixed'), (43, 'Senior'), (44, 'Youth'), (45, 'Unknown'), (46, 'VLQ')], null=True)),
                  ('round_kind', models.IntegerField(blank=True, choices=[(1, 'Finals'), (2, 'Semi-Finals'), (3, 'Quarter-Finals')], null=True)),
                  ('group_name', models.CharField(blank=True, max_length=255)),
                  ('appearance_num', models.IntegerField(blank=True, null=True)),
                  ('song_num', models.IntegerField(blank=True, null=True)),
                  ('song_title', models.CharField(blank=True, max_length=255)),
                  ('totals', models.IntegerField(blank=True, null=True)),
                  ('points', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(blank=True, null=True), blank=True, null=True, size=None)),
                  ('song_id', models.UUIDField(blank=True, null=True)),
              ],
          ),
          migrations.CreateModel(
              name='Flat',
              fields=[
                  ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('score_id', models.UUIDField(blank=True, null=True)),
                  ('complete', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='flats', to='keller.Complete')),
                  ('selection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='flats', to='keller.Selection')),
              ],
              options={
                  'unique_together': {('complete', 'selection', 'score_id')},
              },
          ),
          migrations.CreateModel(
              name='CleanFlat',
              fields=[
                  ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                  ('points', models.IntegerField()),
                  ('score_id', models.UUIDField(blank=True, null=True)),
                  ('cleanpanelist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cleanflats', to='keller.CleanPanelist')),
                  ('cleansong', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cleanflats', to='keller.CleanSong')),
              ],
              options={
                  'unique_together': {('cleanpanelist', 'cleansong')},
              },
          ),
      ]
  