# Generated by Django 3.1.3 on 2022-01-14 08:36

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('intervention', '0001_initial'),
        ('konova', '0001_initial'),
        ('compensation', '0001_initial'),
        ('user', '0001_initial'),
        ('codelist', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='payment',
            name='created',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='payment',
            name='intervention',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='payments', to='intervention.intervention'),
        ),
        migrations.AddField(
            model_name='payment',
            name='modified',
            field=models.ForeignKey(blank=True, help_text='Last modified', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='ecoaccountdocument',
            name='created',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='ecoaccountdocument',
            name='instance',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='compensation.ecoaccount'),
        ),
        migrations.AddField(
            model_name='ecoaccountdocument',
            name='modified',
            field=models.ForeignKey(blank=True, help_text='Last modified', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='ecoaccountdeduction',
            name='account',
            field=models.ForeignKey(blank=True, help_text='Deducted from', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='deductions', to='compensation.ecoaccount'),
        ),
        migrations.AddField(
            model_name='ecoaccountdeduction',
            name='created',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='ecoaccountdeduction',
            name='intervention',
            field=models.ForeignKey(blank=True, help_text='Deducted for', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='deductions', to='intervention.intervention'),
        ),
        migrations.AddField(
            model_name='ecoaccountdeduction',
            name='modified',
            field=models.ForeignKey(blank=True, help_text='Last modified', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='actions',
            field=models.ManyToManyField(blank=True, help_text="Refers to 'Maßnahmen'", to='compensation.CompensationAction'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='after_states',
            field=models.ManyToManyField(blank=True, help_text="Refers to 'Zielzustand Biotop'", related_name='_ecoaccount_after_states_+', to='compensation.CompensationState'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='before_states',
            field=models.ManyToManyField(blank=True, help_text="Refers to 'Ausgangszustand Biotop'", related_name='_ecoaccount_before_states_+', to='compensation.CompensationState'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='created',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='deadlines',
            field=models.ManyToManyField(blank=True, related_name='_ecoaccount_deadlines_+', to='konova.Deadline'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='deleted',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='geometry',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='konova.geometry'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='legal',
            field=models.OneToOneField(blank=True, help_text='Holds data on legal dates or law', null=True, on_delete=django.db.models.deletion.SET_NULL, to='intervention.legal'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='log',
            field=models.ManyToManyField(blank=True, editable=False, help_text='Keeps all user actions of an object', to='user.UserActionLogEntry'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='modified',
            field=models.ForeignKey(blank=True, help_text='Last modified', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='recorded',
            field=models.OneToOneField(blank=True, help_text='Holds data on user and timestamp of this action', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='responsible',
            field=models.OneToOneField(blank=True, help_text="Holds data on responsible organizations ('Zulassungsbehörde', 'Eintragungsstelle') and handler", null=True, on_delete=django.db.models.deletion.SET_NULL, to='intervention.responsibility'),
        ),
        migrations.AddField(
            model_name='ecoaccount',
            name='users',
            field=models.ManyToManyField(help_text='Users having access (data shared with)', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='compensationstate',
            name='biotope_type',
            field=models.ForeignKey(blank=True, limit_choices_to={'code_lists__in': [974], 'is_archived': False, 'is_selectable': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, to='codelist.konovacode'),
        ),
        migrations.AddField(
            model_name='compensationdocument',
            name='created',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='compensationdocument',
            name='instance',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='compensation.compensation'),
        ),
        migrations.AddField(
            model_name='compensationdocument',
            name='modified',
            field=models.ForeignKey(blank=True, help_text='Last modified', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='compensationaction',
            name='action_type',
            field=models.ForeignKey(blank=True, limit_choices_to={'code_lists__in': [1026], 'is_archived': False, 'is_selectable': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, to='codelist.konovacode'),
        ),
        migrations.AddField(
            model_name='compensationaction',
            name='created',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='compensationaction',
            name='modified',
            field=models.ForeignKey(blank=True, help_text='Last modified', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='actions',
            field=models.ManyToManyField(blank=True, help_text="Refers to 'Maßnahmen'", to='compensation.CompensationAction'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='after_states',
            field=models.ManyToManyField(blank=True, help_text="Refers to 'Zielzustand Biotop'", related_name='_compensation_after_states_+', to='compensation.CompensationState'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='before_states',
            field=models.ManyToManyField(blank=True, help_text="Refers to 'Ausgangszustand Biotop'", related_name='_compensation_before_states_+', to='compensation.CompensationState'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='created',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='deadlines',
            field=models.ManyToManyField(blank=True, related_name='_compensation_deadlines_+', to='konova.Deadline'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='deleted',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='geometry',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='konova.geometry'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='intervention',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='compensations', to='intervention.intervention'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='log',
            field=models.ManyToManyField(blank=True, editable=False, help_text='Keeps all user actions of an object', to='user.UserActionLogEntry'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='modified',
            field=models.ForeignKey(blank=True, help_text='Last modified', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='user.useractionlogentry'),
        ),
        migrations.AddField(
            model_name='compensation',
            name='responsible',
            field=models.OneToOneField(blank=True, help_text="Holds data on responsible organizations ('Zulassungsbehörde', 'Eintragungsstelle') and handler", null=True, on_delete=django.db.models.deletion.SET_NULL, to='intervention.responsibility'),
        ),
    ]
