# Generated by Django 3.2 on 2022-07-04 10:24

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('celery_id', models.CharField(max_length=120)),
                ('runner_path', models.CharField(max_length=255)),
                ('input', models.JSONField(default=dict)),
                ('results', models.JSONField(default=dict)),
                ('username', models.CharField(default='', max_length=100, verbose_name='Username')),
                ('started_on', models.DateTimeField(blank=True, null=True)),
                ('finished_on', models.DateTimeField(blank=True, null=True)),
                ('revert_started_on', models.DateTimeField(blank=True, null=True)),
                ('revert_finished_on', models.DateTimeField(blank=True, null=True)),
                ('log', models.TextField(default='')),
                ('status', models.CharField(choices=[('ERROR', 'Error'), ('PENDI', 'To DO'), ('DOING', 'Doing'), ('DONE', 'Done'), ('CANCG', 'Cancelling'), ('CANCD', 'Canceled'), ('TOREV', 'To Revert'), ('REVTG', 'Reverting'), ('REVTD', 'Reverted')], default='PENDI', max_length=5)),
                ('expire_on', models.DateTimeField(blank=True, null=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('queue', models.CharField(default='celery', max_length=32)),
            ],
            options={
                'permissions': (('can_create_task', 'Can create task'), ('can_revert_task', 'Can revert task'), ('can_cancel_task', 'Can cancel task')),
            },
        ),
    ]
