# Generated by Django 2.1.4 on 2018-12-29 17:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BaseScript',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('_status', models.CharField(choices=[('running', 'running'), ('cancelled', 'cancelled'), ('failed', 'failed'), ('error', 'error'), ('warning', 'warning'), ('waiting', 'waiting'), ('unknown', 'unknown'), ('passed', 'passed')], db_column='status', default='unknown', max_length=9)),
                ('file_name', models.CharField(max_length=256)),
                ('file_path', models.CharField(max_length=1024)),
                ('script', models.TextField(blank=True, null=True)),
                ('timestamp_start', models.DateTimeField(blank=True, null=True)),
                ('timestamp_stop', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
        migrations.CreateModel(
            name='DryRunData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ['-timestamp', '-pk'],
            },
        ),
        migrations.CreateModel(
            name='Machine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('machine_name', models.CharField(max_length=256, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='MasterScenario',
            fields=[
                ('basescript_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tm_api.BaseScript')),
            ],
            options={
                'ordering': ['-pk'],
            },
            bases=('tm_api.basescript',),
        ),
        migrations.CreateModel(
            name='Scenario',
            fields=[
                ('basescript_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tm_api.BaseScript')),
                ('master_scenario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scenarios', to='tm_api.MasterScenario')),
            ],
            options={
                'ordering': ['-pk'],
            },
            bases=('tm_api.basescript',),
        ),
        migrations.CreateModel(
            name='Test',
            fields=[
                ('basescript_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tm_api.BaseScript')),
                ('scenario_parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tests', to='tm_api.Scenario')),
            ],
            options={
                'ordering': ['-pk'],
            },
            bases=('tm_api.basescript',),
        ),
        migrations.AddField(
            model_name='dryrundata',
            name='machine',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dry_run_datas', to='tm_api.Machine'),
        ),
        migrations.AddField(
            model_name='dryrundata',
            name='master_scenario',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='tm_api.MasterScenario'),
        ),
    ]
