# Generated by Django 2.0.6 on 2018-06-24 20:59

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('document', '0001_initial'),
        ('core', '0002_auto_20180624_1759'),
        ('accounting', '0002_auto_20180624_1759'),
        ('flow', '0001_initial'),
        ('user', '0001_initial'),
        ('client', '0002_auto_20180624_1759'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='formdefinitionacl',
            name='author',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='form_defintion_acl_author_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='formdefinitionacl',
            name='form_definition',
            field=models.ForeignKey(db_column='form_definition', on_delete=django.db.models.deletion.PROTECT, related_name='form_defintion_acl_set', to='document.FormDefinition'),
        ),
        migrations.AddField(
            model_name='formdefinitionacl',
            name='org_unit',
            field=models.ForeignKey(blank=True, db_column='org_unit', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='form_defintion_acl_set', to='user.OrgUnit'),
        ),
        migrations.AddField(
            model_name='formdefinitionacl',
            name='role',
            field=models.ForeignKey(blank=True, db_column='role', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='form_defintion_acl_set', to='user.Role'),
        ),
        migrations.AddField(
            model_name='formdefinitionacl',
            name='user',
            field=models.ForeignKey(blank=True, db_column='user', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='form_defintion_acl_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='formdefinition',
            name='author',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='form_definition_author_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='formdefinition',
            name='form_class',
            field=models.ForeignKey(db_column='form_class', on_delete=django.db.models.deletion.PROTECT, related_name='form_definition_set', to='document.FormClass'),
        ),
        migrations.AddField(
            model_name='formclass',
            name='account_type',
            field=models.ForeignKey(blank=True, db_column='account_type', null=True, on_delete=django.db.models.deletion.PROTECT, to='accounting.AccountType'),
        ),
        migrations.AddField(
            model_name='formclass',
            name='author',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='formclass',
            name='concept_type',
            field=models.ForeignKey(blank=True, db_column='concept_type', null=True, on_delete=django.db.models.deletion.PROTECT, to='core.ConceptType'),
        ),
        migrations.AddField(
            model_name='formclass',
            name='third_party_summary_type',
            field=models.ForeignKey(blank=True, db_column='third_party_summary_type', null=True, on_delete=django.db.models.deletion.PROTECT, to='document.FormClass'),
        ),
        migrations.AddField(
            model_name='formactionmap',
            name='action_definition',
            field=models.ForeignKey(blank=True, db_column='action_definition', null=True, on_delete=django.db.models.deletion.PROTECT, to='core.ActionDefinition'),
        ),
        migrations.AddField(
            model_name='formactionmap',
            name='author',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='formactionmap',
            name='form_definition',
            field=models.ForeignKey(blank=True, db_column='form_definition', null=True, on_delete=django.db.models.deletion.PROTECT, to='document.FormDefinition'),
        ),
        migrations.AddField(
            model_name='documenttablecontent',
            name='document',
            field=models.ForeignKey(blank=True, db_column='document', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='table_content_set', to='document.DocumentHeader'),
        ),
        migrations.AddField(
            model_name='documenttablecontent',
            name='form_definition',
            field=models.ForeignKey(blank=True, db_column='form_definition', null=True, on_delete=django.db.models.deletion.PROTECT, to='document.FormDefinition'),
        ),
        migrations.AddField(
            model_name='documenthrn',
            name='document',
            field=models.ForeignKey(db_column='document', help_text='antares.apps.document.models.document_hrn.document_help', on_delete=django.db.models.deletion.CASCADE, related_name='document_hrn_set', to='document.DocumentHeader', verbose_name='antares.apps.document.models.document_hrn.document'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='account_document',
            field=models.ForeignKey(blank=True, db_column='account_document', help_text='antares.apps.document.models.document_header.account_document_help', null=True, on_delete=django.db.models.deletion.PROTECT, to='accounting.AccountDocument', verbose_name='antares.apps.document.models.document_header.account_document'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='account_type',
            field=models.ForeignKey(blank=True, db_column='account_type', help_text='antares.apps.document.models.document_header.account_type_help', null=True, on_delete=django.db.models.deletion.PROTECT, to='accounting.AccountType', verbose_name='antares.apps.document.models.document_header.account_type'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='associated_case',
            field=models.ForeignKey(blank=True, db_column='associated_case', help_text='antares.apps.document.models.document_header.associated_case_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_header_associated_case_set', to='flow.FlowCase', verbose_name='antares.apps.document.models.document_header.associated_case'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='associated_to',
            field=models.ForeignKey(blank=True, help_text='antares.apps.document.models.document_header.associated_to_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='associated_document_header_set', to='document.DocumentHeader', verbose_name='antares.apps.document.models.document_header.associated_to'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='author',
            field=models.ForeignKey(blank=True, db_column='author', help_text='antares.apps.document.models.document_header.author_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_header_author_set', to=settings.AUTH_USER_MODEL, verbose_name='antares.apps.document.models.document_header.author'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='base_document',
            field=models.ForeignKey(blank=True, db_column='base_document', help_text='antares.apps.document.models.document_header.base_document_help', null=True, on_delete=django.db.models.deletion.PROTECT, to='document.DocumentHeader', verbose_name='antares.apps.document.models.document_header.base_document'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='branch',
            field=models.ForeignKey(blank=True, db_column='branch', help_text='antares.apps.document.models.document_header.branch_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_header_branch_set', to='client.ClientBranch', verbose_name='antares.apps.document.models.document_header.branch'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='cancel_case',
            field=models.ForeignKey(blank=True, db_column='cancel_case', help_text='antares.apps.document.models.document_header.cancel_case_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_header_cancel_case_set', to='flow.FlowCase', verbose_name='antares.apps.document.models.document_header.cancel_case'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='client',
            field=models.ForeignKey(blank=True, db_column='client', help_text='antares.apps.document.models.document_header.client_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_header_client_set', to='client.Client', verbose_name='antares.apps.document.models.document_header.client'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='concept_type',
            field=models.ForeignKey(blank=True, db_column='concept_type', help_text='antares.apps.document.models.document_header.concept_type_help', null=True, on_delete=django.db.models.deletion.PROTECT, to='core.ConceptType', verbose_name='antares.apps.document.models.document_header.concept_type'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='delete_case',
            field=models.ForeignKey(blank=True, db_column='delete_case', help_text='antares.apps.document.models.document_header.delete_case_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_header_delete_case_set', to='flow.FlowCase', verbose_name='antares.apps.document.models.document_header.delete_case'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='form_definition',
            field=models.ForeignKey(blank=True, db_column='form_definition', help_text='antares.apps.document.models.document_header.form_definition_help', null=True, on_delete=django.db.models.deletion.PROTECT, to='document.FormDefinition', verbose_name='antares.apps.document.models.document_header.form_definition'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='related_case',
            field=models.ForeignKey(blank=True, db_column='related_case', help_text='antares.apps.document.models.document_header.related_case_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_header_related_case_set', to='flow.FlowCase', verbose_name='antares.apps.document.models.document_header.related_case'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='secondary_client',
            field=models.ForeignKey(blank=True, db_column='secondary_client', help_text='antares.apps.document.models.document_header.secondary_client_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_header_secondary_client_set', to='client.Client', verbose_name='antares.apps.document.models.document_header.secondary_client'),
        ),
        migrations.AddField(
            model_name='documentheader',
            name='user_referral',
            field=models.ForeignKey(blank=True, db_column='user_referral', help_text='antares.apps.document.models.document_header.user_referral_help', null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='antares.apps.document.models.document_header.user_referral'),
        ),
        migrations.AddField(
            model_name='documentfield',
            name='document',
            field=models.ForeignKey(db_column='document', help_text='antares.apps.document.models.document_field.document_help', on_delete=django.db.models.deletion.CASCADE, related_name='field_set', to='document.DocumentHeader', verbose_name='antares.apps.document.models.document_field.document'),
        ),
        migrations.AddField(
            model_name='documentfield',
            name='form_definition',
            field=models.ForeignKey(db_column='form_definition', help_text='antares.apps.document.models.document_field.form_definition_help', on_delete=django.db.models.deletion.CASCADE, related_name='field_set', to='document.FormDefinition', verbose_name='antares.apps.document.models.document_field.form_definition'),
        ),
        migrations.AddField(
            model_name='documentacl',
            name='author',
            field=models.ForeignKey(editable=False, help_text='antares.apps.document.models.document_acl.author_help', on_delete=django.db.models.deletion.PROTECT, related_name='document_acl_author_set', to=settings.AUTH_USER_MODEL, verbose_name='antares.apps.document.models.document_acl.author'),
        ),
        migrations.AddField(
            model_name='documentacl',
            name='document',
            field=models.ForeignKey(db_column='form_definition', help_text='antares.apps.document.models.document_acl.document_help', on_delete=django.db.models.deletion.PROTECT, related_name='document_acl_set', to='document.DocumentHeader', verbose_name='antares.apps.document.models.document_acl.document'),
        ),
        migrations.AddField(
            model_name='documentacl',
            name='org_unit',
            field=models.ForeignKey(blank=True, db_column='org_unit', help_text='antares.apps.document.models.document_acl.org_unit_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_acl_set', to='user.OrgUnit', verbose_name='antares.apps.document.models.document_acl.org_unit'),
        ),
        migrations.AddField(
            model_name='documentacl',
            name='role',
            field=models.ForeignKey(blank=True, db_column='role', help_text='antares.apps.document.models.document_acl.role_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='role_acl', to='user.Role', verbose_name='antares.apps.document.models.document_acl.role'),
        ),
        migrations.AddField(
            model_name='documentacl',
            name='user',
            field=models.ForeignKey(blank=True, db_column='user_acl', help_text='antares.apps.document.models.document_acl.user_help', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='document_acl_set', to=settings.AUTH_USER_MODEL, verbose_name='antares.apps.document.models.document_acl.user'),
        ),
        migrations.AlterUniqueTogether(
            name='indexedfield',
            unique_together={('definition', 'document')},
        ),
        migrations.AlterUniqueTogether(
            name='documenttablecontent',
            unique_together={('document', 'table_definition', 'row_number', 'definition')},
        ),
        migrations.AlterUniqueTogether(
            name='documenthrn',
            unique_together={('document', 'status')},
        ),
        migrations.AlterUniqueTogether(
            name='documentfield',
            unique_together={('definition', 'document')},
        ),
    ]
