# 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 = [
        ('obligation', '0001_initial'),
        ('core', '0002_auto_20180624_1759'),
        ('accounting', '0002_auto_20180624_1759'),
        ('document', '0002_auto_20180624_1759'),
        ('client', '0002_auto_20180624_1759'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='obligationvectorlog',
            name='author',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='obligation_vector_log_author_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='obligationvectorlog',
            name='obligation_status',
            field=models.ForeignKey(blank=True, db_column='obligation', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='obligation_vector_log_set', to='obligation.ObligationVector'),
        ),
        migrations.AddField(
            model_name='obligationvector',
            name='account_type',
            field=models.ForeignKey(db_column='account_type', on_delete=django.db.models.deletion.PROTECT, related_name='obligation_status_account_type_set', to='accounting.AccountType'),
        ),
        migrations.AddField(
            model_name='obligationvector',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='obligation_vector_author_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='obligationvector',
            name='base_document',
            field=models.ForeignKey(blank=True, db_column='base_document', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='obligation_status_base_document_set', to='document.DocumentHeader'),
        ),
        migrations.AddField(
            model_name='obligationvector',
            name='client',
            field=models.ForeignKey(blank=True, db_column='client', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='obligation_status_client_set', to='client.Client'),
        ),
        migrations.AddField(
            model_name='obligationvector',
            name='client_obligation',
            field=models.ForeignKey(blank=True, db_column='client_obligation', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='obligation_status_client_obligation_set', to='obligation.ClientObligation'),
        ),
        migrations.AddField(
            model_name='obligationvector',
            name='compliance_document',
            field=models.ForeignKey(blank=True, db_column='compliance_document', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='obligation_vector_compliance_document_set', to='document.DocumentHeader'),
        ),
        migrations.AddField(
            model_name='obligationvector',
            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='obligationvector',
            name='source_document',
            field=models.ForeignKey(blank=True, db_column='source_document', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='obligation_vector_source_document_set', to='document.DocumentHeader'),
        ),
        migrations.AddField(
            model_name='obligationrule',
            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='obligationrule',
            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='obligationrule',
            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='obligationrule',
            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='clientobligation',
            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='clientobligation',
            name='author',
            field=models.ForeignKey(db_column='author', on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='clientobligation',
            name='base_document',
            field=models.ForeignKey(blank=True, db_column='base_obligation', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='client_obligation_base_document_set', to='document.DocumentHeader'),
        ),
        migrations.AddField(
            model_name='clientobligation',
            name='client',
            field=models.ForeignKey(blank=True, db_column='client', null=True, on_delete=django.db.models.deletion.PROTECT, to='client.Client'),
        ),
        migrations.AddField(
            model_name='clientobligation',
            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='clientobligation',
            name='obligation_rule',
            field=models.ForeignKey(blank=True, db_column='obligation_rule', null=True, on_delete=django.db.models.deletion.PROTECT, to='obligation.ObligationRule'),
        ),
        migrations.AlterUniqueTogether(
            name='obligationvector',
            unique_together={('client', 'concept_type', 'period', 'account_type', 'base_document')},
        ),
        migrations.AlterUniqueTogether(
            name='clientobligation',
            unique_together={('client', 'concept_type')},
        ),
    ]
