# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-04-03 18:09
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('time_created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('time_updated', models.DateTimeField(auto_now=True, db_index=True)),
                ('time_finished', models.DateTimeField(db_index=True, null=True)),
                ('status', models.CharField(choices=[(b'ACTIVE', b'ACTIVE'), (b'FAILURE', b'FAILURE'), (b'PENDING', b'PENDING'), (b'SUCCESS', b'SUCCESS')], db_index=True, default=b'PENDING', max_length=255)),
                ('error_message', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ActivityGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uuid', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, null=True)),
                ('name', models.CharField(max_length=255)),
                ('time_created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('time_finished', models.DateTimeField(db_index=True, null=True)),
                ('status', models.CharField(choices=[(b'ACTIVE', b'ACTIVE'), (b'FAILURE', b'FAILURE'), (b'SUCCESS', b'SUCCESS')], db_index=True, default=b'ACTIVE', max_length=255)),
                ('error_message', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='activity',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='activities', to='activity.ActivityGroup'),
        ),
    ]
