# Generated by Django 2.2 on 2019-09-04 16:08

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


class Migration(migrations.Migration):

    dependencies = [
        ('entities', '0003_auto_20190903_1725'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChangeRequestFormHeader',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('requested_to_template_name', models.CharField(max_length=255)),
                ('requested_to_template_id', models.CharField(max_length=255)),
                ('requested_to_objective', models.CharField(blank=True, max_length=255, null=True)),
                ('requested_to_target_date', models.DateTimeField(blank=True, null=True)),
                ('requested_to_priority', models.CharField(max_length=255)),
                ('description', models.CharField(blank=True, max_length=255, null=True)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('form_code', models.CharField(max_length=255, unique=True)),
                ('cancel_date', models.DateTimeField(blank=True, null=True)),
                ('status', models.CharField(max_length=50)),
                ('company_desc', models.CharField(blank=True, max_length=255, null=True)),
                ('department_desc', models.CharField(blank=True, max_length=255, null=True)),
                ('requested_desc', models.CharField(blank=True, max_length=255, null=True)),
                ('old_form_code', models.CharField(blank=True, max_length=255, null=True)),
                ('requested_by_department', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='requested_by_department', to='entities.Department', to_field='code')),
                ('requested_by_user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='requested_by_user', to=settings.AUTH_USER_MODEL, to_field='code')),
                ('requested_to_company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.Company', to_field='code')),
                ('requested_to_department', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.Department', to_field='code')),
                ('requested_to_user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, to_field='code')),
            ],
            options={
                'db_table': 'change_request_form_headers',
            },
        ),
        migrations.CreateModel(
            name='ChangeRequestTemplateHeader',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('requested_to_template_name', models.CharField(max_length=255)),
                ('requested_to_template_id', models.CharField(max_length=255)),
                ('requested_to_objective', models.CharField(blank=True, max_length=255, null=True)),
                ('requested_to_target_date', models.DateTimeField(blank=True, null=True)),
                ('requested_to_priority', models.CharField(max_length=255)),
                ('description', models.CharField(blank=True, max_length=255, null=True)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('template_no', models.CharField(max_length=255, unique=True)),
                ('created_by_department', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='created_by_department', to='entities.Department', to_field='code')),
                ('created_by_user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='created_by_user', to=settings.AUTH_USER_MODEL, to_field='code')),
                ('requested_to_company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.Company', to_field='code')),
                ('requested_to_department', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.Department', to_field='code')),
                ('requested_to_user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, to_field='code')),
            ],
            options={
                'db_table': 'change_request_template_headers',
            },
        ),
        migrations.CreateModel(
            name='ChangeRequestTemplateStakeHolders',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_added', models.DateTimeField(blank=True, null=True)),
                ('delegation', models.CharField(blank=True, max_length=255, null=True)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('code', models.CharField(max_length=255, unique=True)),
                ('template_no', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.ChangeRequestTemplateHeader', to_field='template_no')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, to_field='code')),
            ],
            options={
                'db_table': 'change_request_template_stakeholders',
            },
        ),
        migrations.CreateModel(
            name='ChangeRequestTemplateDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('field_idx', models.CharField(max_length=255)),
                ('field_ref', models.CharField(max_length=255)),
                ('field_val', models.CharField(max_length=255)),
                ('field_props', models.CharField(max_length=255)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('code', models.CharField(max_length=255, unique=True)),
                ('template_no', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.ChangeRequestTemplateHeader', to_field='template_no')),
            ],
            options={
                'db_table': 'change_request_template_details',
            },
        ),
        migrations.CreateModel(
            name='ChangeRequestTemplateAttachments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('upload_no', models.CharField(blank=True, max_length=255, null=True)),
                ('attachment_type', models.CharField(max_length=255)),
                ('attachment_name', models.CharField(max_length=255)),
                ('file_name', models.CharField(blank=True, max_length=255, null=True)),
                ('description', models.CharField(blank=True, max_length=255, null=True)),
                ('file_upload', models.CharField(blank=True, max_length=255, null=True)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('attachment_no', models.CharField(max_length=255, unique=True)),
                ('template_no', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.ChangeRequestTemplateHeader', to_field='template_no')),
                ('uploaded_by', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, to_field='code')),
            ],
            options={
                'db_table': 'change_request_template_attachments',
            },
        ),
        migrations.CreateModel(
            name='ChangeRequestTemplateApprovers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('level', models.CharField(blank=True, max_length=50, null=True)),
                ('delegation', models.CharField(max_length=50)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('code', models.CharField(max_length=255, unique=True)),
                ('template_no', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.ChangeRequestTemplateHeader', to_field='template_no')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, to_field='code')),
            ],
            options={
                'db_table': 'change_request_template_approvers',
            },
        ),
        migrations.CreateModel(
            name='ChangeRequestFormStakeHolders',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_added', models.DateTimeField(blank=True, null=True)),
                ('delegation', models.CharField(blank=True, max_length=255, null=True)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('code', models.CharField(max_length=255, unique=True)),
                ('form_code', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.ChangeRequestFormHeader', to_field='form_code')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, to_field='code')),
            ],
            options={
                'db_table': 'change_request_form_stakeholders',
            },
        ),
        migrations.AddField(
            model_name='changerequestformheader',
            name='template_no',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.ChangeRequestTemplateHeader', to_field='template_no'),
        ),
        migrations.CreateModel(
            name='ChangeRequestFormDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('field_idx', models.CharField(max_length=255)),
                ('field_ref', models.CharField(max_length=255)),
                ('field_val', models.CharField(max_length=255)),
                ('field_props', models.CharField(max_length=255)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('code', models.CharField(max_length=255, unique=True)),
                ('form_code', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.ChangeRequestFormHeader', to_field='form_code')),
            ],
            options={
                'db_table': 'change_request_form_details',
            },
        ),
        migrations.CreateModel(
            name='ChangeRequestFormAttachments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('upload_no', models.CharField(blank=True, max_length=255, null=True)),
                ('attachment_type', models.CharField(max_length=255)),
                ('attachment_name', models.CharField(max_length=255)),
                ('file_name', models.CharField(blank=True, max_length=255, null=True)),
                ('description', models.CharField(blank=True, max_length=255, null=True)),
                ('file_upload', models.CharField(blank=True, max_length=255, null=True)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('code', models.CharField(max_length=255, unique=True)),
                ('form_code', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.ChangeRequestFormHeader', to_field='form_code')),
                ('uploaded_by', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, to_field='code')),
            ],
            options={
                'db_table': 'change_request_form_attachments',
            },
        ),
        migrations.CreateModel(
            name='ChangeRequestFormApprovers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('level', models.CharField(blank=True, max_length=50, null=True)),
                ('delegation', models.CharField(max_length=50)),
                ('created', models.DateTimeField(blank=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('code', models.CharField(max_length=255, unique=True)),
                ('remarks', models.CharField(blank=True, max_length=255, null=True)),
                ('form_code', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='entities.ChangeRequestFormHeader', to_field='form_code')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, to_field='code')),
            ],
            options={
                'db_table': 'change_request_form_approvers',
            },
        ),
    ]
