text: # Generated by Django 3.0.2 on 2020-04-21 15:00
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('drf_schemas', '0001_initial'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Application',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('document', models.CharField(max_length=255)),
                  ('year', models.IntegerField()),
                  ('status', models.CharField(choices=[('created', 'created'), ('accepted', 'accepted'), ('rejected', 'rejected'), ('archived', 'archived')], default='created', max_length=255)),
                  ('accepted_at', models.DateTimeField(blank=True, null=True)),
                  ('rejected_at', models.DateTimeField(blank=True, null=True)),
                  ('archived_at', models.DateTimeField(blank=True, null=True)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Corporation',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('name', models.CharField(max_length=255)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Dependency',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('name', models.CharField(max_length=255)),
                  ('corporation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dependencies', to='api.Corporation')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='File',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('file', models.FileField(upload_to='')),
                  ('size_bytes', models.IntegerField(blank=True, default=0)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Image',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('image', models.ImageField(upload_to='')),
                  ('size_bytes', models.IntegerField(blank=True, default=0)),
                  ('height', models.IntegerField(blank=True, default=0)),
                  ('width', models.IntegerField(blank=True, default=0)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Position',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('name', models.CharField(max_length=255)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Toxicological',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
                  ('result', models.TextField(blank=True, default='')),
                  ('passed', models.BooleanField(blank=True, null=True)),
                  ('started_at', models.DateTimeField(blank=True, null=True)),
                  ('finished_at', models.DateTimeField(blank=True, null=True)),
                  ('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='toxicological_eval', to='drf_schemas.Item')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Socioeconomic',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
                  ('result', models.TextField(blank=True, default='')),
                  ('passed', models.BooleanField(blank=True, null=True)),
                  ('started_at', models.DateTimeField(blank=True, null=True)),
                  ('finished_at', models.DateTimeField(blank=True, null=True)),
                  ('digi_entry', models.CharField(blank=True, choices=[('empty', 'empty')], default='', max_length=64)),
                  ('digi_date', models.DateField(blank=True, null=True)),
                  ('digi_id_type', models.CharField(blank=True, choices=[('ine', 'ine'), ('passport', 'passport')], default='', max_length=64)),
                  ('digi_id_number', models.CharField(blank=True, max_length=64, null=True)),
                  ('digi_image', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='socioeconomic_digi', to='api.Image')),
                  ('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='socioeconomic_eval', to='drf_schemas.Item')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Secondment',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('name', models.CharField(max_length=255)),
                  ('dependency', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='secondments', to='api.Dependency')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Psychological',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
                  ('result', models.TextField(blank=True, default='')),
                  ('passed', models.BooleanField(blank=True, null=True)),
                  ('started_at', models.DateTimeField(blank=True, null=True)),
                  ('finished_at', models.DateTimeField(blank=True, null=True)),
                  ('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='psychological_eval', to='drf_schemas.Item')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Polygraphic',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
                  ('result', models.TextField(blank=True, default='')),
                  ('passed', models.BooleanField(blank=True, null=True)),
                  ('started_at', models.DateTimeField(blank=True, null=True)),
                  ('finished_at', models.DateTimeField(blank=True, null=True)),
                  ('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polygraphic_eval', to='drf_schemas.Item')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Medical',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('status', models.CharField(choices=[('created', 'created'), ('started', 'started'), ('finished', 'finished')], default='created', max_length=255)),
                  ('result', models.TextField(blank=True, default='')),
                  ('passed', models.BooleanField(blank=True, null=True)),
                  ('started_at', models.DateTimeField(blank=True, null=True)),
                  ('finished_at', models.DateTimeField(blank=True, null=True)),
                  ('eval_data', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='medical_eval', to='drf_schemas.Item')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Evaluation',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('type', models.CharField(choices=[('ordinary', 'ordinary'), ('extra', 'extra'), ('repeat', 'repeat')], default='ordinary', max_length=255)),
                  ('scheduled_at', models.DateTimeField(blank=True, null=True)),
                  ('application', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Application')),
                  ('medical', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Medical')),
                  ('polygraphic', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Polygraphic')),
                  ('psychological', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Psychological')),
                  ('socioeconomic', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Socioeconomic')),
                  ('toxicological', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='api.Toxicological')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='Candidate',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('name', models.CharField(max_length=255)),
                  ('last_name', models.CharField(max_length=255)),
                  ('curp', models.CharField(max_length=255)),
                  ('image', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='candidate', to='api.Image')),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.AddField(
              model_name='application',
              name='candidate',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Candidate'),
          ),
          migrations.AddField(
              model_name='application',
              name='corporation',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Corporation'),
          ),
          migrations.AddField(
              model_name='application',
              name='dependency',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Dependency'),
          ),
          migrations.AddField(
              model_name='application',
              name='position',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Position'),
          ),
          migrations.AddField(
              model_name='application',
              name='secondment',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='api.Secondment'),
          ),
          migrations.CreateModel(
              name='Alert',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('created_at', models.DateTimeField(auto_now_add=True)),
                  ('updated_at', models.DateTimeField(auto_now=True)),
                  ('info', models.TextField()),
                  ('section', models.CharField(choices=[('socioeconomic', 'socioeconomic'), ('medical', 'medical'), ('polygraphic', 'polygraphic'), ('psychological', 'psychological'), ('toxicological', 'toxicological')], max_length=64)),
                  ('evaluation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='alerts', to='api.Evaluation')),
              ],
              options={
                  'abstract': False,
              },
          ),
      ]
  