# Generated by Django 3.1.2 on 2021-02-09 15:37

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('reduction_viewer', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Variable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('value', models.CharField(max_length=300)),
                ('type', models.CharField(max_length=50)),
                ('is_advanced', models.BooleanField(default=False)),
                ('help_text', models.TextField(blank=True, default='', null=True)),
            ],
        ),
        migrations.CreateModel(
            name='RunVariable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reduction_run', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='run_variables', to='reduction_viewer.reductionrun')),
                ('variable', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='runs', to='instrument.variable')),
            ],
        ),
        migrations.CreateModel(
            name='InstrumentVariable',
            fields=[
                ('variable_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='instrument.variable')),
                ('experiment_reference', models.IntegerField(blank=True, null=True)),
                ('start_run', models.IntegerField(blank=True, null=True)),
                ('tracks_script', models.BooleanField(default=False)),
                ('instrument', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='reduction_viewer.instrument')),
            ],
            bases=('instrument.variable',),
        ),
    ]
