# Generated by Django 2.2.10 on 2021-06-15 11:17

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Column',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('column_name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('file_name', models.CharField(max_length=255, primary_key=True, serialize=False)),
                ('uploaded_time', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='SmellType',
            fields=[
                ('smell_type', models.CharField(max_length=255, primary_key=True, serialize=False)),
                ('belonging_file', models.ManyToManyField(to='app.File')),
            ],
        ),
        migrations.CreateModel(
            name='Parameter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('min_value', models.FloatField()),
                ('max_value', models.FloatField()),
                ('value', models.FloatField(blank=True, null=True)),
                ('belonging_file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.File')),
                ('belonging_smell', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.SmellType')),
            ],
        ),
        migrations.CreateModel(
            name='DetectedSmell',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total_element_count', models.IntegerField()),
                ('faulty_element_count', models.IntegerField()),
                ('faulty_list', models.CharField(max_length=1024)),
                ('belonging_column', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Column')),
                ('data_smell_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.SmellType')),
            ],
        ),
        migrations.AddField(
            model_name='column',
            name='belonging_file',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.File'),
        ),
    ]
