# Generated by Django 3.0.3 on 2020-02-27 09:55

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('project_core', '0107_historicalcall_historicalcontact_historicalfundinginstrument_historicalpersonposition_historicalphys'),
    ]

    operations = [
        migrations.CreateModel(
            name='HistoricalTemplateQuestion',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('created_on', models.DateTimeField(blank=True, editable=False, help_text='Date and time at which the entry was created')),
                ('modified_on', models.DateTimeField(blank=True, editable=False, help_text='Date and time at which the entry was modified', null=True)),
                ('question_text', models.TextField(help_text='Question text')),
                ('question_description', models.TextField(blank=True, help_text='Explanation of question to enable full completion of answer', null=True)),
                ('answer_type', models.CharField(choices=[('Text', 'Text'), ('File', 'File')], default='Text', help_text='Type of field that should be applied to the question answer', max_length=5)),
                ('answer_max_length', models.PositiveIntegerField(blank=True, help_text='Maximum number of words for a question answer', null=True, verbose_name='Answer maximum length (used for answer type TEXT, in words)')),
                ('answer_required', models.BooleanField(default=True)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'historical template question',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='HistoricalCallQuestion',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('created_on', models.DateTimeField(blank=True, editable=False, help_text='Date and time at which the entry was created')),
                ('modified_on', models.DateTimeField(blank=True, editable=False, help_text='Date and time at which the entry was modified', null=True)),
                ('question_text', models.TextField(help_text='Question text')),
                ('question_description', models.TextField(blank=True, help_text='Explanation of question to enable full completion of answer', null=True)),
                ('answer_type', models.CharField(choices=[('Text', 'Text'), ('File', 'File')], default='Text', help_text='Type of field that should be applied to the question answer', max_length=5)),
                ('answer_max_length', models.PositiveIntegerField(blank=True, help_text='Maximum number of words for a question answer', null=True, verbose_name='Answer maximum length (used for answer type TEXT, in words)')),
                ('answer_required', models.BooleanField(default=True)),
                ('order', models.PositiveIntegerField(help_text='Use the integer order to order the questions')),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('call', models.ForeignKey(blank=True, db_constraint=False, help_text='Questions for a call', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='project_core.Call')),
                ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('template_question', models.ForeignKey(blank=True, db_constraint=False, help_text='Template question on which this call question is based', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='project_core.TemplateQuestion')),
            ],
            options={
                'verbose_name': 'historical call question',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
    ]
