# Generated by Django 2.2.12 on 2020-12-31 08:52

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


class Migration(migrations.Migration):

    dependencies = [
        ('gwml2', '0040_well_downloadable'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='uploadsession',
            options={'ordering': ('-uploaded_at',), 'verbose_name': 'Upload session', 'verbose_name_plural': 'Upload sessions'},
        ),
        migrations.AddField(
            model_name='uploadsession',
            name='affiliate_organisations',
            field=models.ManyToManyField(blank=True, null=True, related_name='well_upload_affiliate_organisations', to='gwml2.Organisation'),
        ),
        migrations.AddField(
            model_name='uploadsession',
            name='public',
            field=models.BooleanField(default=True, help_text='indicate that well can be viewed by non organisation user'),
        ),
        migrations.AlterField(
            model_name='uploadsession',
            name='status',
            field=models.TextField(blank=True, help_text='What is the status of progress. Mostly it will split by added, error and skipped ', null=True),
        ),
        migrations.AlterModelTable(
            name='uploadsession',
            table='upload_session',
        ),
        migrations.CreateModel(
            name='UploadSessionRowStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sheet_name', models.CharField(max_length=256)),
                ('row', models.IntegerField()),
                ('column', models.IntegerField()),
                ('status', models.IntegerField(choices=[(0, 'Added'), (1, 'Error'), (2, 'Skipped')])),
                ('note', models.TextField(blank=True, null=True)),
                ('upload_session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gwml2.UploadSession')),
            ],
            options={
                'verbose_name': 'Upload session row status',
                'verbose_name_plural': 'Upload sessions row statuses',
                'db_table': 'upload_session_row_status',
                'unique_together': {('upload_session', 'sheet_name', 'row', 'column')},
            },
        ),
    ]
