# -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2022-04-01 19:24
from __future__ import unicode_literals

import datasets.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import fluwebvirus.formatChecker


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Consensus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=200, verbose_name='Consensus name')),
                ('display_name', models.CharField(db_index=True, default='', max_length=200, verbose_name='Display name')),
                ('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Uploaded Date')),
                ('consensus_fasta', fluwebvirus.formatChecker.ContentTypeRestrictedFileField(blank=True, max_length=500, null=True, upload_to=datasets.models.consensus_directory_path)),
                ('consensus_fasta_name', models.CharField(default='', max_length=200, verbose_name='Fasta file')),
                ('hash_consensus_fasta', models.CharField(blank=True, max_length=50, null=True)),
                ('is_obsolete', models.BooleanField(default=False, verbose_name='Obsolete')),
                ('is_deleted', models.BooleanField(default=False, verbose_name='Deleted')),
                ('description', models.CharField(blank=True, default='', max_length=500, null=True, verbose_name='Description')),
                ('is_deleted_in_file_system', models.BooleanField(default=False)),
                ('date_deleted', models.DateTimeField(blank=True, null=True, verbose_name='Date attached')),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='consensus', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Consensus',
                'verbose_name_plural': 'Consensus',
                'ordering': ['-creation_date'],
            },
        ),
        migrations.AddIndex(
            model_name='consensus',
            index=models.Index(fields=['name'], name='name_consensus_idx'),
        ),
    ]
