# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-10 19:37
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Configuration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=1000)),
                ('notes', models.TextField(blank=True, null=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Experiment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=1000, unique=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Parameter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=1000)),
                ('value', models.CharField(max_length=1000, null=True)),
                ('type', models.CharField(choices=[('str', 'String'), ('int', 'Integer'), ('float', 'Float'), ('channel', 'Channel')], max_length=1000)),
                ('configuration', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Configuration')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='configuration',
            name='experiment',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Experiment'),
        ),
        migrations.AlterUniqueTogether(
            name='parameter',
            unique_together=set([('configuration', 'name')]),
        ),
        migrations.AlterUniqueTogether(
            name='configuration',
            unique_together=set([('experiment', 'name')]),
        ),
    ]
