aboutsummaryrefslogblamecommitdiffstats
path: root/ctrack/register/migrations/0007_auto_20201013_1250.py
blob: 9dc4cfb8827e5deb00bc98de33aeee1f7715541e (plain) (tree)



















































































                                                                                                                                                                                                                                                                                                                                                                                                                               
# Generated by Django 3.1.2 on 2020-10-13 12:50

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


class Migration(migrations.Migration):

    dependencies = [
        ('caf', '0002_caf_systems'),
        ('organisations', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('register', '0006_engagementtype_single_date_type'),
    ]

    operations = [
        migrations.CreateModel(
            name='CAFMixin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('related_caf', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='caf.caf')),
            ],
        ),
        migrations.CreateModel(
            name='SingleDateTimeEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_date', models.DateTimeField()),
                ('modified_date', models.DateTimeField()),
                ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
                ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
                ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
                ('location', models.CharField(blank=True, max_length=100)),
                ('datetime', models.DateTimeField()),
                ('type_descriptor', models.CharField(choices=[('MEETING', 'Meeting'), ('PHONE_CALL', 'Phone Call'), ('VIDEO_CALL', 'Video Call')], max_length=50)),
                ('participants', models.ManyToManyField(blank=True, null=True, to='organisations.Person')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CAFTwinDateEvent',
            fields=[
                ('cafmixin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='register.cafmixin')),
                ('created_date', models.DateTimeField()),
                ('modified_date', models.DateTimeField()),
                ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
                ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
                ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
                ('start_date', models.DateField()),
                ('end_date', models.DateField(blank=True, null=True)),
                ('type_descriptor', models.CharField(choices=[('CAF_PEER_REVIEW_PERIOD', 'CAF - Peer Review Period'), ('CAF_VALIDATION_PERIOD', 'CAF - Validation Period')], max_length=50)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            bases=('register.cafmixin', models.Model),
        ),
        migrations.CreateModel(
            name='CAFSingleDateEvent',
            fields=[
                ('cafmixin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='register.cafmixin')),
                ('created_date', models.DateTimeField()),
                ('modified_date', models.DateTimeField()),
                ('short_description', models.CharField(help_text='Short description of the event. Use Comments field for full detail.', max_length=50)),
                ('document_link', models.URLField(blank=True, help_text='URL only - do not try to drag a file here.', max_length=1000, null=True)),
                ('comments', models.TextField(blank=True, help_text='Use this to provide further detail about the event.', max_length=1000, null=True)),
                ('date', models.DateField()),
                ('type_descriptor', models.CharField(choices=[('CAF_INITIAL_CAF_RECEIVED', 'CAF - Initial CAF Received'), ('CAF_FEEDBACK_EMAILED_OES', 'CAF - Emailed to OES'), ('CAF_RECEIVED', 'CAF - Received'), ('CAF_EMAILED_ROSA', 'CAF - Emailed to Rosa'), ('CAF_VALIDATION_SIGN_OFF', 'CAF - Validation Sign Off'), ('CAF_VALIDATION_RECORD_EMAILED_TO_OES', 'CAF - Validation Record Sent to OES')], max_length=50)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            bases=('register.cafmixin', models.Model),
        ),
        migrations.AddConstraint(
            model_name='caftwindateevent',
            constraint=models.CheckConstraint(check=models.Q(_negated=True, end_date__lt=django.db.models.expressions.F('start_date')), name='register_caftwindateevent_cannot_precede_start_date'),
        ),
        migrations.AddConstraint(
            model_name='cafsingledateevent',
            constraint=models.UniqueConstraint(condition=models.Q(_negated=True, type_descriptor='CAF_EMAILED_ROSA'), fields=('date', 'type_descriptor'), name='unique_caf_for_date'),
        ),
    ]