# Generated by Django 2.0.5 on 2018-05-18 11:47

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields


class Migration(migrations.Migration):

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('genomix_workflows', '0002_auto_20180516_1649'),
    ]

    operations = [
        migrations.CreateModel(
            name='Reference',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('object_id', models.PositiveIntegerField(db_index=True)),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('workflow', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='references', to='genomix_workflows.Workflow')),
            ],
            options={
                'verbose_name': 'Reference',
                'verbose_name_plural': 'References',
            },
        ),
        migrations.DeleteModel(
            name='Connection',
        ),
        migrations.AddField(
            model_name='workflowinstance',
            name='state',
            field=models.PositiveSmallIntegerField(choices=[(1, 'Active'), (2, 'Complete'), (3, 'Hold'), (4, 'Canceled')], default=1),
        ),
        migrations.AlterField(
            model_name='workflowinstance',
            name='parent',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='genomix_workflows.WorkflowInstance'),
        ),
        migrations.AlterUniqueTogether(
            name='reference',
            unique_together={('content_type', 'object_id', 'workflow')},
        ),
    ]
