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

    operations = [
        migrations.AddField(
            model_name='reassigmentlog',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='flow_reassigment_log_signer_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='reassigmentlog',
            name='flow_activity',
            field=models.ForeignKey(db_column='flow_activity', on_delete=django.db.models.deletion.PROTECT, related_name='reassigment_set', to='flow.FlowActivity'),
        ),
        migrations.AddField(
            model_name='reassigmentlog',
            name='flow_case',
            field=models.ForeignKey(db_column='flow_case', on_delete=django.db.models.deletion.PROTECT, related_name='reassigment_set', to='flow.FlowCase'),
        ),
        migrations.AddField(
            model_name='reassigmentlog',
            name='new_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='flow_reassigment_log_new_user_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='reassigmentlog',
            name='original_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='flow_reassigment_log_original_user_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='propertydefinition',
            name='flow_definition',
            field=models.ForeignKey(blank=True, db_column='flow_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='property_definition_set', to='flow.FlowDefinition'),
        ),
        migrations.AddField(
            model_name='participantdefinition',
            name='flow_definition',
            field=models.ForeignKey(blank=True, db_column='flow_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='participant_definition_set', to='flow.FlowDefinition'),
        ),
        migrations.AddField(
            model_name='participantdefinition',
            name='org_unit',
            field=models.ForeignKey(blank=True, db_column='org_unit', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='flow_participant_definition_set', to='user.OrgUnit'),
        ),
        migrations.AddField(
            model_name='participantdefinition',
            name='role',
            field=models.ForeignKey(blank=True, db_column='role', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='flow_participant_definition_set', to='user.Role'),
        ),
        migrations.AddField(
            model_name='participantdefinition',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='flowusernotificationoption',
            name='flow_case',
            field=models.ForeignKey(db_column='flow_case', on_delete=django.db.models.deletion.PROTECT, related_name='user_notification_option_set', to='flow.FlowCase'),
        ),
        migrations.AddField(
            model_name='flowusernotificationoption',
            name='performer',
            field=models.ForeignKey(db_column='perfomer', on_delete=django.db.models.deletion.PROTECT, related_name='user_notification_option_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='flowproperty',
            name='flow_case',
            field=models.ForeignKey(db_column='flow_case', on_delete=django.db.models.deletion.PROTECT, related_name='property_set', to='flow.FlowCase'),
        ),
        migrations.AddField(
            model_name='flowproperty',
            name='property_definition',
            field=models.ForeignKey(db_column='property_definition', on_delete=django.db.models.deletion.PROTECT, related_name='property_set', to='flow.PropertyDefinition'),
        ),
        migrations.AddField(
            model_name='flowpackage',
            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='flownote',
            name='author',
            field=models.ForeignKey(db_column='author', on_delete=django.db.models.deletion.PROTECT, related_name='flow_note_author_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='flownote',
            name='flow_case',
            field=models.ForeignKey(db_column='flow_case', on_delete=django.db.models.deletion.PROTECT, related_name='note_set', to='flow.FlowCase'),
        ),
        migrations.AddField(
            model_name='flowdocument',
            name='document',
            field=models.ForeignKey(db_column='document', on_delete=django.db.models.deletion.PROTECT, related_name='flow_document_set', to='document.DocumentHeader'),
        ),
        migrations.AddField(
            model_name='flowdocument',
            name='flow_case',
            field=models.ForeignKey(db_column='flow_case', on_delete=django.db.models.deletion.PROTECT, related_name='document_set', to='flow.FlowCase'),
        ),
        migrations.AddField(
            model_name='flowdefinition',
            name='flow_package',
            field=models.ForeignKey(blank=True, db_column='flow_package', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='flow_definition_set', to='flow.FlowPackage'),
        ),
        migrations.AddField(
            model_name='flowcase',
            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='flowcase',
            name='flow_definition',
            field=models.ForeignKey(blank=True, db_column='flow_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='flow_case_set', to='flow.FlowDefinition'),
        ),
        migrations.AddField(
            model_name='flowcase',
            name='source',
            field=models.ForeignKey(blank=True, db_column='source', null=True, on_delete=django.db.models.deletion.PROTECT, to='message.Message'),
        ),
        migrations.AddField(
            model_name='flowattachment',
            name='author',
            field=models.ForeignKey(db_column='author', on_delete=django.db.models.deletion.PROTECT, related_name='flow_attachment_author_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='flowattachment',
            name='flow_case',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='attachment_set', to='flow.FlowCase'),
        ),
        migrations.AddField(
            model_name='flowactivityvalidation',
            name='activity_definition',
            field=models.ForeignKey(db_column='activity_definition', on_delete=django.db.models.deletion.PROTECT, related_name='validation_set', to='flow.ActivityDefinition'),
        ),
        migrations.AddField(
            model_name='flowactivityformparameter',
            name='form',
            field=models.ForeignKey(db_column='form_definition', on_delete=django.db.models.deletion.PROTECT, related_name='parameter_set', to='flow.FlowActivityForm'),
        ),
        migrations.AddField(
            model_name='flowactivityform',
            name='activity_definition',
            field=models.ForeignKey(db_column='activity_definition', on_delete=django.db.models.deletion.PROTECT, related_name='form_set', to='flow.ActivityDefinition'),
        ),
        migrations.AddField(
            model_name='flowactivityform',
            name='form_definition',
            field=models.ForeignKey(db_column='form_definition', on_delete=django.db.models.deletion.PROTECT, related_name='flow_activity_form_set', to='document.FormDefinition'),
        ),
        migrations.AddField(
            model_name='flowactivityextratabparameter',
            name='tab',
            field=models.ForeignKey(db_column='tab', on_delete=django.db.models.deletion.PROTECT, related_name='parameter_set', to='flow.FlowActivityExtraTab'),
        ),
        migrations.AddField(
            model_name='flowactivityextratab',
            name='activity_definition',
            field=models.ForeignKey(db_column='activity_definition', on_delete=django.db.models.deletion.PROTECT, related_name='extra_tab_set', to='flow.ActivityDefinition'),
        ),
        migrations.AddField(
            model_name='flowactivity',
            name='activity_definition',
            field=models.ForeignKey(db_column='activity_definition', on_delete=django.db.models.deletion.PROTECT, related_name='activity_set', to='flow.ActivityDefinition'),
        ),
        migrations.AddField(
            model_name='flowactivity',
            name='flow_case',
            field=models.ForeignKey(db_column='flow_case', on_delete=django.db.models.deletion.PROTECT, related_name='activity_set', to='flow.FlowCase'),
        ),
        migrations.AddField(
            model_name='flowactivity',
            name='participant_definition',
            field=models.ForeignKey(blank=True, db_column='participant_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='activity_set', to='flow.ParticipantDefinition'),
        ),
        migrations.AddField(
            model_name='flowactivity',
            name='performer',
            field=models.ForeignKey(blank=True, db_column='performer', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='flow_activity_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='flowactiondefinitionparametermap',
            name='action_definition',
            field=models.ForeignKey(db_column='action_definition', on_delete=django.db.models.deletion.PROTECT, related_name='parameter_set', to='flow.FlowActionDefinition'),
        ),
        migrations.AddField(
            model_name='flowactiondefinitionparametermap',
            name='parameter_definition',
            field=models.ForeignKey(db_column='action_parameter_definition', on_delete=django.db.models.deletion.PROTECT, to='core.ActionParameterDefinition'),
        ),
        migrations.AddField(
            model_name='flowactiondefinition',
            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='flowactiondefinition',
            name='activity_definition',
            field=models.ForeignKey(db_column='activity_definition', on_delete=django.db.models.deletion.PROTECT, related_name='action_definition_set', to='flow.ActivityDefinition'),
        ),
        migrations.AddField(
            model_name='assignmentlist',
            name='activity_definition',
            field=models.ForeignKey(blank=True, db_column='activity_definition', null=True, on_delete=django.db.models.deletion.PROTECT, to='flow.ActivityDefinition'),
        ),
        migrations.AddField(
            model_name='assignmentlist',
            name='flow_case',
            field=models.ForeignKey(blank=True, db_column='flow_case', null=True, on_delete=django.db.models.deletion.PROTECT, to='flow.FlowCase'),
        ),
        migrations.AddField(
            model_name='assignmentlist',
            name='flow_definition',
            field=models.ForeignKey(blank=True, db_column='flow_definition', null=True, on_delete=django.db.models.deletion.PROTECT, to='flow.FlowDefinition'),
        ),
        migrations.AddField(
            model_name='assignmentlist',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='applicationparameterdefinition',
            name='application_definition',
            field=models.ForeignKey(blank=True, db_column='application_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='parameter_definition_set', to='flow.ApplicationDefinition'),
        ),
        migrations.AddField(
            model_name='applicationdefinition',
            name='flow_definition',
            field=models.ForeignKey(blank=True, db_column='flow_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='application_definition_set', to='flow.FlowDefinition'),
        ),
        migrations.AddField(
            model_name='activitylog',
            name='flow_activity',
            field=models.ForeignKey(db_column='flow_activity', on_delete=django.db.models.deletion.PROTECT, related_name='activity_log_set', to='flow.FlowActivity'),
        ),
        migrations.AddField(
            model_name='activitylog',
            name='performer',
            field=models.ForeignKey(db_column='performer', on_delete=django.db.models.deletion.PROTECT, related_name='flow_activity_log_performer_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='activitydefinition',
            name='flow_definition',
            field=models.ForeignKey(blank=True, db_column='flow_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='activity_definition_set', to='flow.FlowDefinition'),
        ),
        migrations.AddField(
            model_name='activitydefinition',
            name='participant_definition_set',
            field=models.ManyToManyField(blank=True, to='flow.ParticipantDefinition'),
        ),
        migrations.AddField(
            model_name='activityapplicationparameterdefinition',
            name='activity_application',
            field=models.ForeignKey(blank=True, db_column='activity_application', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='parameter_definition_set', to='flow.ActivityApplicationDefinition'),
        ),
        migrations.AddField(
            model_name='activityapplicationparameterdefinition',
            name='application_parameter_definition',
            field=models.ForeignKey(blank=True, db_column='application_parameter_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='parameter_definition_set', to='flow.ApplicationParameterDefinition'),
        ),
        migrations.AddField(
            model_name='activityapplicationdefinition',
            name='activity_definition',
            field=models.ForeignKey(blank=True, db_column='activity_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='activity_application_definition_set', to='flow.ActivityDefinition'),
        ),
        migrations.AddField(
            model_name='activityapplicationdefinition',
            name='application_definition',
            field=models.ForeignKey(blank=True, db_column='application_definition', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='activity_application_definition_set', to='flow.ApplicationDefinition'),
        ),
        migrations.AlterUniqueTogether(
            name='flowproperty',
            unique_together={('flow_case', 'property_definition')},
        ),
        migrations.AlterUniqueTogether(
            name='flowpackage',
            unique_together={('package_id', 'package_version')},
        ),
        migrations.AlterUniqueTogether(
            name='flowdocument',
            unique_together={('flow_case', 'document')},
        ),
        migrations.AlterUniqueTogether(
            name='flowdefinition',
            unique_together={('flow_package', 'flow_id', 'flow_version')},
        ),
        migrations.AlterUniqueTogether(
            name='applicationdefinition',
            unique_together={('flow_definition', 'application_id')},
        ),
    ]
