# Generated by Django 3.2.7 on 2022-03-16 11:21

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



class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('barriers', '0115_alter_barriersearchcsvdownloadevent_barrier_ids'),
    ]

    operations = [
        migrations.CreateModel(
            name='BarrierProgressUpdate',
            fields=[
                ('created_on', models.DateTimeField(auto_now_add=True, db_index=True, null=True)),
                ('modified_on', models.DateTimeField(auto_now=True, null=True)),
                ('archived', models.BooleanField(default=False)),
                ('archived_on', models.DateTimeField(blank=True, null=True)),
                ('archived_reason', models.TextField(blank=True)),
                ('unarchived_reason', models.TextField(blank=True)),
                ('unarchived_on', models.DateTimeField(blank=True, null=True)),
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('status', models.CharField(choices=[('ON_TRACK', 'On track'), ('RISK_OF_DELAY', 'Risk of delay'), ('DELAYED', 'Delayed')], max_length=100, null=True)),
                ('update', models.TextField(blank=True, help_text='What has been done to address the barrier?', null=True)),
                ('next_steps', models.TextField(blank=True, help_text='What next steps are required to address the barrier?', null=True)),
                ('archived_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('barrier', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='progress_updates', to='barriers.barrier')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('unarchived_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Barrier Progress Update',
                'verbose_name_plural': 'Barrier Progress Updates',
                'ordering': ('-created_on',),
            },
        ),
    ]
