# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-17 17:16
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Batch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(editable=False)),
                ('updated_at', models.DateTimeField()),
                ('source_type', models.CharField(max_length=256)),
                ('size_in_bytes', models.IntegerField()),
                ('download_url', models.CharField(max_length=256)),
                ('raw_format', models.CharField(max_length=256)),
                ('processed_format', models.CharField(max_length=256)),
                ('pipeline_required', models.CharField(max_length=256)),
                ('accession_code', models.CharField(max_length=32)),
                ('internal_location', models.CharField(max_length=256)),
                ('organism', models.IntegerField()),
                ('status', models.CharField(choices=[(b'NEW', b'New'), (b'DOWNLOADING', b'Downloading'), (b'DOWNLOADED', b'Downloaded'), (b'PROCESSING', b'Processing'), (b'PROCESSED', b'Proccessed')], max_length=10)),
            ],
            options={
                'db_table': 'batches',
            },
        ),
        migrations.CreateModel(
            name='BatchKeyValue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(editable=False)),
                ('updated_at', models.DateTimeField()),
                ('key', models.CharField(max_length=256)),
                ('value', models.CharField(max_length=256)),
                ('batch_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bioinformatics_mill_models.Batch')),
            ],
            options={
                'db_table': 'batch_key_values',
            },
        ),
        migrations.CreateModel(
            name='DownloaderJob',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(editable=False)),
                ('updated_at', models.DateTimeField()),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField()),
                ('success', models.NullBooleanField()),
                ('num_retries', models.IntegerField()),
                ('worker_id', models.CharField(max_length=256)),
                ('batch_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bioinformatics_mill_models.Batch')),
            ],
            options={
                'db_table': 'downloader_jobs',
            },
        ),
        migrations.CreateModel(
            name='ProcessorJob',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(editable=False)),
                ('updated_at', models.DateTimeField()),
                ('pipeline_applied', models.CharField(max_length=256)),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField()),
                ('success', models.NullBooleanField()),
                ('num_retries', models.IntegerField()),
                ('worker_id', models.CharField(max_length=256)),
                ('batch_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bioinformatics_mill_models.Batch')),
            ],
            options={
                'db_table': 'processor_jobs',
            },
        ),
        migrations.CreateModel(
            name='SurveyJob',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(editable=False)),
                ('updated_at', models.DateTimeField()),
                ('source_type', models.CharField(max_length=256)),
                ('replication_started_at', models.DateTimeField()),
                ('replication_ended_at', models.DateTimeField()),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField()),
            ],
            options={
                'db_table': 'survey_jobs',
            },
        ),
        migrations.AddField(
            model_name='batch',
            name='survey_job',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bioinformatics_mill_models.SurveyJob'),
        ),
    ]
