# Generated by Django 1.11.12 on 2019-02-20 09:00

import django.contrib.postgres.fields.jsonb
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('base', '0011_auto_20190205_1126'),
    ]

    operations = [
        migrations.CreateModel(
            name='Job',
            fields=[
                (
                    'id',
                    models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
                ),
                ('resource_pk', models.PositiveIntegerField()),
                ('method_name', models.CharField(max_length=50)),
                ('natural_id', models.CharField(blank=True, max_length=256, null=True)),
                ('parameters', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
                ('creation_timestamp', models.DateTimeField(auto_now_add=True)),
                ('update_timestamp', models.DateTimeField(auto_now=True)),
                ('done_timestamp', models.DateTimeField(null=True)),
                (
                    'status',
                    models.CharField(
                        choices=[
                            (b'registered', 'Registered'),
                            (b'running', 'Running'),
                            (b'failed', 'Failed'),
                            (b'completed', 'Completed'),
                        ],
                        default=b'registered',
                        max_length=20,
                    ),
                ),
                ('status_details', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
                (
                    'resource_type',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType'
                    ),
                ),
            ],
        ),
    ]
