# Generated by Django 3.0b1 on 2019-10-29 18:12

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('common', '0002_contact_party'),
        ('datastructure', '0001_initial'),
        ('registry', '0001_initial'),
        ('conceptscheme', '0002_auto_20191029_1812'),
        ('base', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='group',
            name='attachment_constraint',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='registry.AttachmentConstraint', verbose_name='Attachment constraint'),
        ),
        migrations.AddField(
            model_name='group',
            name='data_structure',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='datastructure.DataStructure', verbose_name='Data structure'),
        ),
        migrations.AddField(
            model_name='dimensionlist',
            name='data_structure',
            field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='datastructure.DataStructure', verbose_name='Data structure'),
        ),
        migrations.AddField(
            model_name='dimension',
            name='concept_identity',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='dimension_concept_identity_set', related_query_name='dimension_concept_identity', to='conceptscheme.Concept', verbose_name='Concept identity'),
        ),
        migrations.AddField(
            model_name='dimension',
            name='concept_role',
            field=models.ManyToManyField(related_name='dimension_conceptrole_set', related_query_name='dimension_conceptrole', to='conceptscheme.Concept', verbose_name='Concept roles'),
        ),
        migrations.AddField(
            model_name='dimension',
            name='container',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='datastructure.DimensionList'),
        ),
        migrations.AddField(
            model_name='dimension',
            name='local_representation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.Representation', verbose_name='Local represenation'),
        ),
        migrations.AddField(
            model_name='dimension',
            name='measure_local_representation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='conceptscheme.ConceptScheme', verbose_name='Measure local representation'),
        ),
        migrations.AddField(
            model_name='datastructure',
            name='agency',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='base.Agency', verbose_name='Agency'),
        ),
        migrations.AddField(
            model_name='datastructure',
            name='submitted_structure',
            field=models.ManyToManyField(to='registry.SubmittedStructure', verbose_name='Submitted structures'),
        ),
        migrations.AddField(
            model_name='dataflow',
            name='agency',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='base.Agency', verbose_name='Agency'),
        ),
        migrations.AddField(
            model_name='dataflow',
            name='structure',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='datastructure.DataStructure', verbose_name='Data structure reference'),
        ),
        migrations.AddField(
            model_name='dataflow',
            name='submitted_structure',
            field=models.ManyToManyField(to='registry.SubmittedStructure', verbose_name='Submitted structures'),
        ),
        migrations.AddField(
            model_name='attributerelationship',
            name='attachment_group',
            field=models.ManyToManyField(related_name='_attributerelationship_attachment_group_+', to='datastructure.Group', verbose_name='Groups'),
        ),
        migrations.AddField(
            model_name='attributerelationship',
            name='attribute',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='datastructure.Attribute', verbose_name='Attribute'),
        ),
        migrations.AddField(
            model_name='attributerelationship',
            name='dimension',
            field=models.ManyToManyField(related_name='_attributerelationship_dimension_+', to='datastructure.Dimension', verbose_name='Dimensions'),
        ),
        migrations.AddField(
            model_name='attributerelationship',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='datastructure.Group', verbose_name='Group'),
        ),
        migrations.AddField(
            model_name='attributerelationship',
            name='primary_measure',
            field=models.ManyToManyField(related_name='_attributerelationship_primary_measure_+', to='datastructure.PrimaryMeasure', verbose_name='Primary measures'),
        ),
        migrations.AddField(
            model_name='attributelist',
            name='data_structure',
            field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='datastructure.DataStructure', verbose_name='Data structure'),
        ),
        migrations.AddField(
            model_name='attribute',
            name='concept_identity',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='attribute_concept_identity_set', related_query_name='attribute_concept_identity', to='conceptscheme.Concept', verbose_name='Concept identity'),
        ),
        migrations.AddField(
            model_name='attribute',
            name='concept_role',
            field=models.ManyToManyField(related_name='attribute_concept_role_set', related_query_name='attribute_concept_role', to='conceptscheme.Concept', verbose_name='Concept roles'),
        ),
        migrations.AddField(
            model_name='attribute',
            name='container',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='datastructure.AttributeList', verbose_name='Attribute list'),
        ),
        migrations.AddField(
            model_name='attribute',
            name='local_representation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='common.Representation', verbose_name='Local represenation'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='attribute',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.Attribute', verbose_name='Attribute'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='attribute_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.AttributeList', verbose_name='Attribute list'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='data_structure',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.DataStructure', verbose_name='Data structure'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='dataflow',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.Dataflow', verbose_name='Dataflow'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='dimension',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.Dimension', verbose_name='Dimension'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='dimension_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.DimensionList', verbose_name='Dimension list'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.Group', verbose_name='Group'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='group_dimension',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.GroupDimension', verbose_name='Group dimension'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='measure_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.MeasureList', verbose_name='Measure list'),
        ),
        migrations.AddField(
            model_name='annotation',
            name='primary_measure',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='datastructure.PrimaryMeasure', verbose_name='Primary measure'),
        ),
        migrations.AddIndex(
            model_name='primarymeasure',
            index=models.Index(fields=['container', 'concept_identity', 'object_id'], name='datastructu_contain_00fa79_idx'),
        ),
        migrations.AddConstraint(
            model_name='primarymeasure',
            constraint=models.UniqueConstraint(fields=('container', 'concept_identity', 'object_id'), name='datastructure_primarymeasure_unique_component'),
        ),
        migrations.AddIndex(
            model_name='groupdimension',
            index=models.Index(fields=['container', 'dimension'], name='datastructu_contain_a5475a_idx'),
        ),
        migrations.AddConstraint(
            model_name='groupdimension',
            constraint=models.UniqueConstraint(fields=('container', 'dimension'), name='unique_group_dimension'),
        ),
        migrations.AddIndex(
            model_name='group',
            index=models.Index(fields=['data_structure', 'object_id'], name='datastructu_data_st_76e5d2_idx'),
        ),
        migrations.AddConstraint(
            model_name='group',
            constraint=models.UniqueConstraint(fields=('data_structure', 'object_id'), name='unique_group'),
        ),
        migrations.AddIndex(
            model_name='dimension',
            index=models.Index(fields=['container', 'concept_identity', 'object_id'], name='datastructu_contain_3dae64_idx'),
        ),
        migrations.AddConstraint(
            model_name='dimension',
            constraint=models.UniqueConstraint(fields=('container', 'concept_identity', 'object_id'), name='datastructure_dimension_unique_component'),
        ),
        migrations.AddIndex(
            model_name='datastructure',
            index=models.Index(fields=['agency', 'object_id', 'version'], name='datastructu_agency__5a3d07_idx'),
        ),
        migrations.AddConstraint(
            model_name='datastructure',
            constraint=models.UniqueConstraint(fields=('agency', 'object_id', 'version'), name='datastructure_datastructure_unique_maintainable'),
        ),
        migrations.AddIndex(
            model_name='dataflow',
            index=models.Index(fields=['agency', 'object_id', 'version'], name='datastructu_agency__ae1853_idx'),
        ),
        migrations.AddConstraint(
            model_name='dataflow',
            constraint=models.UniqueConstraint(fields=('agency', 'object_id', 'version'), name='datastructure_dataflow_unique_maintainable'),
        ),
        migrations.AddIndex(
            model_name='attribute',
            index=models.Index(fields=['container', 'concept_identity', 'object_id'], name='datastructu_contain_04760c_idx'),
        ),
        migrations.AddConstraint(
            model_name='attribute',
            constraint=models.UniqueConstraint(fields=('container', 'concept_identity', 'object_id'), name='datastructure_attribute_unique_component'),
        ),
    ]
