# Generated by Django 3.2 on 2021-04-25 07:15

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('tasks', '0002_auto_20191014_1413'),
    ]

    operations = [
        migrations.CreateModel(
            name='CountBeansTaskThreaded',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True, verbose_name='id')),
                ('description', models.CharField(blank=True, max_length=256, verbose_name='description')),
                ('created_on', models.DateTimeField(auto_now_add=True, verbose_name='created on')),
                ('started_on', models.DateTimeField(null=True, verbose_name='started on')),
                ('completed_on', models.DateTimeField(null=True, verbose_name='completed on')),
                ('progress', models.IntegerField(blank=True, null=True, verbose_name='progress')),
                ('status', models.CharField(choices=[('PENDING', 'PENDING'), ('RECEIVED', 'RECEIVED'), ('STARTED', 'STARTED'), ('PROGESS', 'PROGESS'), ('SUCCESS', 'SUCCESS'), ('FAILURE', 'FAILURE'), ('REVOKED', 'REVOKED'), ('REJECTED', 'REJECTED'), ('RETRY', 'RETRY'), ('IGNORED', 'IGNORED')], db_index=True, default='PENDING', max_length=128, verbose_name='status')),
                ('job_id', models.CharField(blank=True, max_length=128, verbose_name='job id')),
                ('mode', models.CharField(choices=[('UNKNOWN', 'UNKNOWN'), ('SYNC', 'SYNC'), ('ASYNC', 'ASYNC')], db_index=True, default='UNKNOWN', max_length=128, verbose_name='mode')),
                ('failure_reason', models.CharField(blank=True, max_length=256, verbose_name='failure reason')),
                ('log_text', models.TextField(blank=True, verbose_name='log text')),
                ('num_beans', models.PositiveIntegerField(default=100)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created_on',),
                'get_latest_by': 'created_on',
                'abstract': False,
            },
        ),
    ]
