text: # -*- coding: utf-8 -*-
  # Generated by Django 1.11.16 on 2018-11-27 11:10
  from __future__ import unicode_literals
  
  import bgjobs.models
  import django.contrib.postgres.fields.jsonb
  from django.db import migrations, models
  import django.db.models.deletion
  import django.utils.timezone
  import uuid
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ("projectroles", "0006_add_remote_projects"),
          ("bgjobs", "0004_backgroundjob_user"),
          ("variants", "0021_auto_20181127_0911"),
      ]
  
      operations = [
          migrations.CreateModel(
              name="ExportProjectCasesFileBgJob",
              fields=[
                  (
                      "id",
                      models.AutoField(
                          auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                      ),
                  ),
                  (
                      "date_created",
                      models.DateTimeField(auto_now_add=True, help_text="DateTime of creation"),
                  ),
                  (
                      "sodar_uuid",
                      models.UUIDField(default=uuid.uuid4, help_text="Case SODAR UUID", unique=True),
                  ),
                  (
                      "query_args",
                      django.contrib.postgres.fields.jsonb.JSONField(
                          help_text="(Validated) query parameters"
                      ),
                  ),
                  (
                      "file_type",
                      models.CharField(
                          choices=[
                              ("tsv", "TSV File"),
                              ("xlsx", "Excel File (XLSX)"),
                              ("vcf", "VCF File"),
                          ],
                          help_text="File types for exported file",
                          max_length=32,
                      ),
                  ),
                  (
                      "bg_job",
                      models.ForeignKey(
                          help_text="Background job for state etc.",
                          on_delete=django.db.models.deletion.CASCADE,
                          related_name="variants_exportprojectcasesfilebgjob_related",
                          to="bgjobs.BackgroundJob",
                      ),
                  ),
                  (
                      "project",
                      models.ForeignKey(
                          help_text="Project in which this objects belongs",
                          on_delete=django.db.models.deletion.CASCADE,
                          to="projectroles.Project",
                      ),
                  ),
              ],
              options={"ordering": ("-date_created",), "abstract": False},
              bases=(bgjobs.models.JobModelMessageMixin, models.Model),
          ),
          migrations.CreateModel(
              name="ExportProjectCasesFileBgJobResult",
              fields=[
                  (
                      "id",
                      models.AutoField(
                          auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
                      ),
                  ),
                  (
                      "expiry_time",
                      models.DateTimeField(help_text="Time at which the file download expires"),
                  ),
                  ("payload", models.BinaryField(help_text="Resulting exported file")),
                  (
                      "job",
                      models.OneToOneField(
                          help_text="Related file export job",
                          on_delete=django.db.models.deletion.CASCADE,
                          related_name="export_result",
                          to="variants.ExportProjectCasesFileBgJob",
                      ),
                  ),
              ],
          ),
          migrations.AlterModelOptions(
              name="exportfilebgjob", options={"ordering": ("-date_created",)}
          ),
          migrations.AddField(
              model_name="exportfilebgjob",
              name="date_created",
              field=models.DateTimeField(
                  auto_now_add=True,
                  default=django.utils.timezone.now,
                  help_text="DateTime of creation",
              ),
              preserve_default=False,
          ),
          migrations.AlterField(
              model_name="exportfilebgjob",
              name="bg_job",
              field=models.ForeignKey(
                  help_text="Background job for state etc.",
                  on_delete=django.db.models.deletion.CASCADE,
                  related_name="variants_exportfilebgjob_related",
                  to="bgjobs.BackgroundJob",
              ),
          ),
          migrations.AlterField(
              model_name="exportfilebgjob",
              name="file_type",
              field=models.CharField(
                  choices=[("tsv", "TSV File"), ("xlsx", "Excel File (XLSX)"), ("vcf", "VCF File")],
                  help_text="File types for exported file",
                  max_length=32,
              ),
          ),
      ]
  