# Generated by Django 2.2.2 on 2019-07-17 14:55

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('tom_targets', '0010_merge_20190612_1227'),
        ('tom_dataproducts', '0005_auto_20190704_1010'),
    ]

    operations = [
        migrations.CreateModel(
            name='AsyncProcess',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=50, unique=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('status', models.CharField(default='pending', max_length=50)),
                ('terminal_timestamp', models.DateTimeField(blank=True, null=True)),
                ('failure_message', models.CharField(blank=True, max_length=255)),
                ('target', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tom_targets.Target')),
            ],
        ),
        migrations.CreateModel(
            name='TimelapseDataProduct',
            fields=[
                ('dataproduct_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tom_dataproducts.DataProduct')),
                ('fmt', models.CharField(choices=[('gif', 'GIF'), ('mp4', 'MP4'), ('webm', 'WebM')], default='gif', max_length=10)),
                ('fps', models.FloatField(default=10)),
                ('frames', models.ManyToManyField(related_name='timelapse', to='tom_dataproducts.DataProduct')),
            ],
            bases=('tom_dataproducts.dataproduct',),
        ),
        migrations.CreateModel(
            name='TimelapseProcess',
            fields=[
                ('asyncprocess_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tom_education.AsyncProcess')),
                ('timelapse_product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tom_education.TimelapseDataProduct')),
            ],
            bases=('tom_education.asyncprocess',),
        ),
        migrations.CreateModel(
            name='PipelineProcess',
            fields=[
                ('asyncprocess_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tom_education.AsyncProcess')),
                ('logs', models.TextField(blank=True, null=True)),
                ('flags_json', models.TextField(blank=True, null=True)),
                ('group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='tom_dataproducts.DataProductGroup')),
                ('input_files', models.ManyToManyField(related_name='pipeline', to='tom_dataproducts.DataProduct')),
            ],
            bases=('tom_education.asyncprocess',),
        ),
        migrations.CreateModel(
            name='ObservationTemplate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('facility', models.CharField(max_length=255)),
                ('fields', models.TextField()),
                ('target', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tom_targets.Target')),
            ],
            options={
                'unique_together': {('name', 'target', 'facility')},
            },
        ),
    ]
