# Generated by Django 2.1.4 on 2018-12-27 08:50

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='ControlGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=600)),
                ('vcf_file', models.FileField(blank=True, help_text='File Format: VCF', max_length=600, upload_to=individuals.models.ControlGroup.get_upload_path)),
            ],
        ),
        migrations.CreateModel(
            name='ControlVariant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('index', models.TextField(db_index=True)),
                ('controlgroup', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='individuals.ControlGroup')),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Individual',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=600)),
                ('is_featured', models.BooleanField(default=True)),
                ('is_public', models.BooleanField(default=False)),
                ('vcf_file', models.FileField(blank=True, help_text='File Format: VCF', max_length=600, upload_to=individuals.models.Individual.get_upload_path)),
                ('vcf_header', models.TextField(blank=True, null=True)),
                ('status', models.CharField(blank=True, editable=False, max_length=100)),
                ('n_variants', models.IntegerField(blank=True, editable=False, null=True)),
                ('n_lines', models.IntegerField(blank=True, editable=False, null=True)),
                ('creation_date', models.DateTimeField(auto_now_add=True, null=True)),
                ('modified_date', models.DateTimeField(blank=True, null=True)),
                ('annotation_time', models.CharField(blank=True, max_length=200, null=True)),
                ('insertion_time', models.CharField(blank=True, max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=600)),
                ('members', models.ManyToManyField(blank=True, related_name='members', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='individual',
            name='shared_with_groups',
            field=models.ManyToManyField(blank=True, related_name='shared_with_groups', to='individuals.UserGroup'),
        ),
        migrations.AddField(
            model_name='individual',
            name='shared_with_users',
            field=models.ManyToManyField(blank=True, related_name='shared_with_users', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='individual',
            name='user',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='group',
            name='members',
            field=models.ManyToManyField(related_name='group_members', to='individuals.Individual'),
        ),
    ]
