# Generated by Django 3.1 on 2021-08-04 15:53

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='UserTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_description', models.CharField(blank=True, choices=[('idbac_sql', 'Insert IDBac SQLite data to database'), ('spectra', 'Add spectra files to database'), ('preprocess', 'Preprocess spectra'), ('collapse', 'Collapse replicates'), ('cos_search', 'Cosine score search')], max_length=255, null=True)),
                ('last_modified', models.DateTimeField(auto_now_add=True)),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserTaskStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('start', 'Started'), ('run', 'Running'), ('complete', 'Completed'), ('error', 'Completed - Error'), ('info', 'Info')], max_length=255)),
                ('status_date', models.DateTimeField(auto_now_add=True)),
                ('extra', models.TextField(blank=True, null=True)),
                ('user_task', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tasks.usertask')),
            ],
        ),
        migrations.AddField(
            model_name='usertask',
            name='statuses',
            field=models.ManyToManyField(to='tasks.UserTaskStatus'),
        ),
    ]
