text: # Generated by Django 2.0.7 on 2018-09-18 19:47
  
  import django.contrib.gis.db.models.fields
  import django.contrib.postgres.fields.jsonb
  import django.core.validators
  from django.db import migrations, models
  import django.db.models.deletion
  import phonenumber_field.modelfields
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('hivs_administrative', '0004_add_field_population_source_on_area_and_street'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Center',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=255, verbose_name='name')),
                  ('center_no', models.CharField(max_length=255, unique=True, verbose_name='center number')),
                  ('location', models.CharField(max_length=255, verbose_name='location description')),
                  ('geolocation', django.contrib.gis.db.models.fields.PointField(blank=True, geography=True, null=True, srid=4326, verbose_name='geolocation')),
                  ('phone', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, verbose_name='phone number')),
                  ('email', models.EmailField(blank=True, max_length=254, verbose_name='email')),
                  ('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='created')),
                  ('last_modified', models.DateTimeField(auto_now=True, null=True, verbose_name='last modified')),
                  ('extras', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict, verbose_name='extras')),
                  ('area', models.ForeignKey(help_text='administrative area where the center is located', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='cd_centers', to='hivs_administrative.Area', verbose_name='area')),
                  ('street', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='cd_centers', to='hivs_administrative.Street', verbose_name='street')),
              ],
              options={
                  'verbose_name': 'Distribution Center',
                  'verbose_name_plural': 'Distribution Centers',
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='CondomDistribution',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('date', models.DateField(verbose_name='date')),
                  ('distributor_name', models.CharField(max_length=255, verbose_name='distributor name')),
                  ('gender', models.CharField(max_length=25, verbose_name='gender')),
                  ('age', models.IntegerField(validators=[django.core.validators.MinValueValidator(0)], verbose_name='age')),
                  ('attendance_type', models.CharField(max_length=255, verbose_name='attendance type')),
                  ('hiv_education_delivered', models.BooleanField(default=False, verbose_name='HIV education was delivered')),
                  ('hiv_education_topics', models.CharField(blank=True, max_length=255, verbose_name='HIV education topics delivered')),
                  ('condoms_male_count', models.IntegerField(default=0, help_text='No. of male condoms delivered', validators=[django.core.validators.MinValueValidator(0)], verbose_name='male condoms')),
                  ('condoms_female_count', models.IntegerField(default=0, help_text='No. of male condoms delivered', validators=[django.core.validators.MinValueValidator(0)], verbose_name='female condoms')),
                  ('referral_given', models.BooleanField(default=False, verbose_name='referred to')),
                  ('referral_given_type', models.CharField(blank=True, max_length=255, verbose_name='referred to')),
                  ('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='created')),
                  ('last_modified', models.DateTimeField(auto_now=True, null=True, verbose_name='last modified')),
                  ('extras', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict, verbose_name='extras')),
                  ('center', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='cd_condom_distributions', to='hivs_cd.Center', verbose_name='distribution center')),
              ],
              options={
                  'verbose_name': 'Condom Distribution',
                  'verbose_name_plural': 'Condoms Distributions',
                  'abstract': False,
              },
          ),
      ]
  