# Generated by Django 2.1.4 on 2018-12-18 22:11

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Dataset',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=200)),
                ('csvfile', models.FileField(upload_to='data/')),
                ('train_size', models.BigIntegerField()),
                ('test_size', models.BigIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Feature',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('status', models.CharField(choices=[(pricing.models.FeatureStatus('Input'), 'Input'), (pricing.models.FeatureStatus('Target'), 'Target')], max_length=10)),
                ('dataset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pricing.Dataset')),
            ],
        ),
        migrations.CreateModel(
            name='Modality',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(max_length=50)),
                ('feature', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pricing.Feature')),
            ],
        ),
        migrations.CreateModel(
            name='Model',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=200)),
                ('loss', models.CharField(choices=[(pricing.models.LossFunction('Gaussian'), 'Gaussian'), (pricing.models.LossFunction('Logistic'), 'Logistic'), (pricing.models.LossFunction('Poisson'), 'Poisson'), (pricing.models.LossFunction('Gamma'), 'Gamma')], max_length=10)),
                ('target', models.CharField(max_length=50)),
                ('weight', models.CharField(max_length=50)),
                ('dataset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pricing.Dataset')),
                ('features', models.ManyToManyField(to='pricing.Feature')),
            ],
        ),
        migrations.CreateModel(
            name='Run',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pricing.Model')),
            ],
        ),
    ]
