From 509533477a1c84dcd0a6f635f317b068bf0f957e Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Wed, 2 Feb 2022 08:46:08 +0100 Subject: [PATCH 1/2] # Migrations initial migrations commit --- .gitignore | 3 +- api/migrations/0001_initial.py | 23 ++ api/migrations/__init__.py | 0 codelist/migrations/0001_initial.py | 35 +++ codelist/migrations/__init__.py | 0 compensation/migrations/0001_initial.py | 115 +++++++++ .../migrations/0002_auto_20220114_0936.py | 227 ++++++++++++++++++ compensation/migrations/__init__.py | 0 ema/migrations/0001_initial.py | 42 ++++ ema/migrations/0002_auto_20220114_0936.py | 97 ++++++++ ema/migrations/__init__.py | 0 intervention/migrations/0001_initial.py | 89 +++++++ .../migrations/0002_auto_20220114_0936.py | 136 +++++++++++ intervention/migrations/__init__.py | 0 konova/migrations/0001_initial.py | 78 ++++++ konova/migrations/0002_auto_20220114_0936.py | 37 +++ konova/migrations/__init__.py | 0 news/migrations/0001_initial.py | 30 +++ news/migrations/0002_auto_20220114_0936.py | 27 +++ news/migrations/__init__.py | 0 user/migrations/0001_initial.py | 77 ++++++ user/migrations/0002_user_api_token.py | 20 ++ user/migrations/__init__.py | 0 23 files changed, 1034 insertions(+), 2 deletions(-) create mode 100644 api/migrations/0001_initial.py create mode 100644 api/migrations/__init__.py create mode 100644 codelist/migrations/0001_initial.py create mode 100644 codelist/migrations/__init__.py create mode 100644 compensation/migrations/0001_initial.py create mode 100644 compensation/migrations/0002_auto_20220114_0936.py create mode 100644 compensation/migrations/__init__.py create mode 100644 ema/migrations/0001_initial.py create mode 100644 ema/migrations/0002_auto_20220114_0936.py create mode 100644 ema/migrations/__init__.py create mode 100644 intervention/migrations/0001_initial.py create mode 100644 intervention/migrations/0002_auto_20220114_0936.py create mode 100644 intervention/migrations/__init__.py create mode 100644 konova/migrations/0001_initial.py create mode 100644 konova/migrations/0002_auto_20220114_0936.py create mode 100644 konova/migrations/__init__.py create mode 100644 news/migrations/0001_initial.py create mode 100644 news/migrations/0002_auto_20220114_0936.py create mode 100644 news/migrations/__init__.py create mode 100644 user/migrations/0001_initial.py create mode 100644 user/migrations/0002_user_api_token.py create mode 100644 user/migrations/__init__.py diff --git a/.gitignore b/.gitignore index 2b6313d3..1e56d1d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ # Project exclude paths /venv/ -/.idea/ -*/migrations/ \ No newline at end of file +/.idea/ \ No newline at end of file diff --git a/api/migrations/0001_initial.py b/api/migrations/0001_initial.py new file mode 100644 index 00000000..ead9fb27 --- /dev/null +++ b/api/migrations/0001_initial.py @@ -0,0 +1,23 @@ +# Generated by Django 3.1.3 on 2022-01-28 15:48 + +from django.db import migrations, models +import konova.utils.generators + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='APIUserToken', + fields=[ + ('token', models.CharField(default=konova.utils.generators.generate_token, max_length=1000, primary_key=True, serialize=False)), + ('valid_until', models.DateField(blank=True, help_text='Token is only valid until this date', null=True)), + ('is_active', models.BooleanField(default=False, help_text='Must be activated by an admin')), + ], + ), + ] diff --git a/api/migrations/__init__.py b/api/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/codelist/migrations/0001_initial.py b/codelist/migrations/0001_initial.py new file mode 100644 index 00000000..7962e3c7 --- /dev/null +++ b/codelist/migrations/0001_initial.py @@ -0,0 +1,35 @@ +# Generated by Django 3.1.3 on 2022-01-14 08:36 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='KonovaCode', + fields=[ + ('id', models.IntegerField(help_text='Regular Id', primary_key=True, serialize=False)), + ('atom_id', models.IntegerField(blank=True, help_text='AtomId; Identifies this code uniquely over all NatIT projects; Duplicates possible', null=True)), + ('short_name', models.CharField(blank=True, help_text='Short version of long name', max_length=500, null=True)), + ('long_name', models.CharField(blank=True, max_length=1000, null=True)), + ('is_selectable', models.BooleanField(default=False, help_text='Whether this code shall be used for any select actions or not')), + ('is_leaf', models.BooleanField(default=False, help_text='Whether this code has children or not')), + ('is_archived', models.BooleanField(default=False, help_text='Whether this code is archived or not')), + ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='codelist.konovacode')), + ], + ), + migrations.CreateModel( + name='KonovaCodeList', + fields=[ + ('id', models.IntegerField(help_text='List identifier', primary_key=True, serialize=False)), + ('codes', models.ManyToManyField(blank=True, help_text='Codes for this list', related_name='code_lists', to='codelist.KonovaCode')), + ], + ), + ] diff --git a/codelist/migrations/__init__.py b/codelist/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/compensation/migrations/0001_initial.py b/compensation/migrations/0001_initial.py new file mode 100644 index 00000000..8866b840 --- /dev/null +++ b/compensation/migrations/0001_initial.py @@ -0,0 +1,115 @@ +# Generated by Django 3.1.3 on 2022-01-14 08:36 + +import django.core.validators +from django.db import migrations, models +import konova.models.document +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Compensation', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('identifier', models.CharField(blank=True, max_length=1000, null=True)), + ('title', models.CharField(blank=True, max_length=1000, null=True)), + ('comment', models.TextField(blank=True, null=True)), + ('is_cef', models.BooleanField(blank=True, default=False, help_text="Flag if compensation is a 'CEF-Maßnahme'", null=True)), + ('is_coherence_keeping', models.BooleanField(blank=True, default=False, help_text="Flag if compensation is a 'Kohärenzsicherung'", null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='CompensationAction', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('amount', models.FloatField()), + ('unit', models.CharField(blank=True, choices=[('cm', 'cm'), ('m', 'm'), ('km', 'km'), ('qm', 'm²'), ('ha', 'ha'), ('pcs', 'Pieces')], max_length=100, null=True)), + ('comment', models.TextField(blank=True, help_text='Additional comment', null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='CompensationDocument', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('title', models.CharField(blank=True, max_length=500, null=True)), + ('date_of_creation', models.DateField()), + ('comment', models.TextField()), + ('file', models.FileField(max_length=1000, upload_to=konova.models.document.generate_document_file_upload_path)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='CompensationState', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('surface', models.FloatField()), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='EcoAccount', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('identifier', models.CharField(blank=True, max_length=1000, null=True)), + ('title', models.CharField(blank=True, max_length=1000, null=True)), + ('comment', models.TextField(blank=True, null=True)), + ('access_token', models.CharField(blank=True, help_text='Used for sharing access', max_length=255, null=True)), + ('deductable_surface', models.FloatField(blank=True, default=0, help_text='Amount of deductable surface - can be lower than the total surface due to deduction limitations', null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='EcoAccountDeduction', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('surface', models.FloatField(blank=True, help_text='Amount deducted (m²)', null=True, validators=[django.core.validators.MinValueValidator(limit_value=0.0)])), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='EcoAccountDocument', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('title', models.CharField(blank=True, max_length=500, null=True)), + ('date_of_creation', models.DateField()), + ('comment', models.TextField()), + ('file', models.FileField(max_length=1000, upload_to=konova.models.document.generate_document_file_upload_path)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Payment', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('amount', models.FloatField(validators=[django.core.validators.MinValueValidator(limit_value=0.0)])), + ('due_on', models.DateField(blank=True, null=True)), + ('comment', models.TextField(blank=True, help_text="Refers to german money transfer 'Verwendungszweck'", null=True)), + ], + options={ + 'ordering': ['-amount'], + }, + ), + ] diff --git a/compensation/migrations/0002_auto_20220114_0936.py b/compensation/migrations/0002_auto_20220114_0936.py new file mode 100644 index 00000000..624007fb --- /dev/null +++ b/compensation/migrations/0002_auto_20220114_0936.py @@ -0,0 +1,227 @@ +# 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'), + ), + ] diff --git a/compensation/migrations/__init__.py b/compensation/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ema/migrations/0001_initial.py b/ema/migrations/0001_initial.py new file mode 100644 index 00000000..b3479b50 --- /dev/null +++ b/ema/migrations/0001_initial.py @@ -0,0 +1,42 @@ +# Generated by Django 3.1.3 on 2022-01-14 08:36 + +from django.db import migrations, models +import konova.models.document +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Ema', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('identifier', models.CharField(blank=True, max_length=1000, null=True)), + ('title', models.CharField(blank=True, max_length=1000, null=True)), + ('comment', models.TextField(blank=True, null=True)), + ('access_token', models.CharField(blank=True, help_text='Used for sharing access', max_length=255, null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='EmaDocument', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('title', models.CharField(blank=True, max_length=500, null=True)), + ('date_of_creation', models.DateField()), + ('comment', models.TextField()), + ('file', models.FileField(max_length=1000, upload_to=konova.models.document.generate_document_file_upload_path)), + ], + options={ + 'abstract': False, + }, + ), + ] diff --git a/ema/migrations/0002_auto_20220114_0936.py b/ema/migrations/0002_auto_20220114_0936.py new file mode 100644 index 00000000..364d8620 --- /dev/null +++ b/ema/migrations/0002_auto_20220114_0936.py @@ -0,0 +1,97 @@ +# 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'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('compensation', '0002_auto_20220114_0936'), + ('user', '0001_initial'), + ('ema', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='emadocument', + 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='emadocument', + name='instance', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='ema.ema'), + ), + migrations.AddField( + model_name='emadocument', + 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='ema', + name='actions', + field=models.ManyToManyField(blank=True, help_text="Refers to 'Maßnahmen'", to='compensation.CompensationAction'), + ), + migrations.AddField( + model_name='ema', + name='after_states', + field=models.ManyToManyField(blank=True, help_text="Refers to 'Zielzustand Biotop'", related_name='_ema_after_states_+', to='compensation.CompensationState'), + ), + migrations.AddField( + model_name='ema', + name='before_states', + field=models.ManyToManyField(blank=True, help_text="Refers to 'Ausgangszustand Biotop'", related_name='_ema_before_states_+', to='compensation.CompensationState'), + ), + migrations.AddField( + model_name='ema', + 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='ema', + name='deadlines', + field=models.ManyToManyField(blank=True, related_name='_ema_deadlines_+', to='konova.Deadline'), + ), + migrations.AddField( + model_name='ema', + 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='ema', + name='geometry', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='konova.geometry'), + ), + migrations.AddField( + model_name='ema', + 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='ema', + 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='ema', + 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='ema', + 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='ema', + name='users', + field=models.ManyToManyField(help_text='Users having access (data shared with)', to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/ema/migrations/__init__.py b/ema/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/intervention/migrations/0001_initial.py b/intervention/migrations/0001_initial.py new file mode 100644 index 00000000..b47410be --- /dev/null +++ b/intervention/migrations/0001_initial.py @@ -0,0 +1,89 @@ +# Generated by Django 3.1.3 on 2022-01-14 08:36 + +from django.db import migrations, models +import konova.models.document +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Intervention', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('identifier', models.CharField(blank=True, max_length=1000, null=True)), + ('title', models.CharField(blank=True, max_length=1000, null=True)), + ('comment', models.TextField(blank=True, null=True)), + ('access_token', models.CharField(blank=True, help_text='Used for sharing access', max_length=255, null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='InterventionDocument', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('title', models.CharField(blank=True, max_length=500, null=True)), + ('date_of_creation', models.DateField()), + ('comment', models.TextField()), + ('file', models.FileField(max_length=1000, upload_to=konova.models.document.generate_document_file_upload_path)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Legal', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('registration_date', models.DateField(blank=True, help_text="Refers to 'Zugelassen am'", null=True)), + ('binding_date', models.DateField(blank=True, help_text="Refers to 'Bestandskraft am'", null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Responsibility', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('registration_file_number', models.CharField(blank=True, max_length=1000, null=True)), + ('conservation_file_number', models.CharField(blank=True, max_length=1000, null=True)), + ('handler', models.CharField(blank=True, help_text="Refers to 'Eingriffsverursacher' or 'Maßnahmenträger'", max_length=500, null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Revocation', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('date', models.DateField(blank=True, help_text='Revocation from', null=True)), + ('comment', models.TextField(blank=True, null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='RevocationDocument', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('title', models.CharField(blank=True, max_length=500, null=True)), + ('date_of_creation', models.DateField()), + ('comment', models.TextField()), + ('file', models.FileField(max_length=1000, upload_to=konova.models.document.generate_document_file_upload_path)), + ], + options={ + 'abstract': False, + }, + ), + ] diff --git a/intervention/migrations/0002_auto_20220114_0936.py b/intervention/migrations/0002_auto_20220114_0936.py new file mode 100644 index 00000000..ed158137 --- /dev/null +++ b/intervention/migrations/0002_auto_20220114_0936.py @@ -0,0 +1,136 @@ +# 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'), + ('user', '0001_initial'), + ('codelist', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.AddField( + model_name='revocationdocument', + 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='revocationdocument', + name='instance', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='document', to='intervention.revocation'), + ), + migrations.AddField( + model_name='revocationdocument', + 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='revocation', + 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='revocation', + name='legal', + field=models.ForeignKey(help_text="Refers to 'Widerspruch am'", on_delete=django.db.models.deletion.CASCADE, related_name='revocations', to='intervention.legal'), + ), + migrations.AddField( + model_name='revocation', + 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='responsibility', + name='conservation_office', + field=models.ForeignKey(blank=True, limit_choices_to={'code_lists__in': [907], 'is_archived': False, 'is_selectable': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='codelist.konovacode'), + ), + migrations.AddField( + model_name='responsibility', + name='registration_office', + field=models.ForeignKey(blank=True, limit_choices_to={'code_lists__in': [1053], 'is_archived': False, 'is_selectable': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='codelist.konovacode'), + ), + migrations.AddField( + model_name='legal', + name='laws', + field=models.ManyToManyField(blank=True, limit_choices_to={'code_lists__in': [1048], 'is_archived': False, 'is_selectable': True}, to='codelist.KonovaCode'), + ), + migrations.AddField( + model_name='legal', + name='process_type', + field=models.ForeignKey(blank=True, limit_choices_to={'code_lists__in': [44382], 'is_archived': False, 'is_selectable': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='codelist.konovacode'), + ), + migrations.AddField( + model_name='interventiondocument', + 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='interventiondocument', + name='instance', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='intervention.intervention'), + ), + migrations.AddField( + model_name='interventiondocument', + 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='intervention', + name='checked', + 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='intervention', + 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='intervention', + 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='intervention', + name='geometry', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='konova.geometry'), + ), + migrations.AddField( + model_name='intervention', + 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='intervention', + 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='intervention', + 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='intervention', + 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='intervention', + name='responsible', + field=models.OneToOneField(blank=True, help_text="Holds data on responsible organizations ('Zulassungsbehörde', 'Eintragungsstelle')", null=True, on_delete=django.db.models.deletion.SET_NULL, to='intervention.responsibility'), + ), + migrations.AddField( + model_name='intervention', + name='users', + field=models.ManyToManyField(help_text='Users having access (data shared with)', to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/intervention/migrations/__init__.py b/intervention/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/konova/migrations/0001_initial.py b/konova/migrations/0001_initial.py new file mode 100644 index 00000000..2f821907 --- /dev/null +++ b/konova/migrations/0001_initial.py @@ -0,0 +1,78 @@ +# Generated by Django 3.1.3 on 2022-01-14 08:36 + +import django.contrib.gis.db.models.fields +from django.db import migrations, models +import django.db.models.deletion +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Deadline', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('type', models.CharField(blank=True, choices=[('finished', 'Finished'), ('maintain', 'Maintain'), ('control', 'Control'), ('other', 'Other')], max_length=255, null=True)), + ('date', models.DateField(blank=True, null=True)), + ('comment', models.TextField(blank=True, null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='District', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('gmnd', models.CharField(blank=True, help_text='Gemeinde', max_length=1000, null=True)), + ('krs', models.CharField(blank=True, help_text='Kreis', max_length=1000, null=True)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Geometry', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('geom', django.contrib.gis.db.models.fields.MultiPolygonField(blank=True, null=True, srid=4326)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='Parcel', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('gmrkng', models.CharField(blank=True, help_text='Gemarkung', max_length=1000, null=True)), + ('flrstck_nnr', models.CharField(blank=True, help_text='Flurstücksnenner', max_length=1000, null=True)), + ('flrstck_zhlr', models.CharField(blank=True, help_text='Flurstückszähler', max_length=1000, null=True)), + ('flr', models.CharField(blank=True, help_text='Flur', max_length=1000, null=True)), + ('updated_on', models.DateTimeField(auto_now_add=True)), + ('district', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='parcels', to='konova.district')), + ('geometries', models.ManyToManyField(blank=True, related_name='parcels', to='konova.Geometry')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='GeometryConflict', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('detected_on', models.DateTimeField(auto_now_add=True, null=True)), + ('affected_geometry', models.ForeignKey(help_text='The geometry which came first', on_delete=django.db.models.deletion.CASCADE, related_name='conflicted_by_geometries', to='konova.geometry')), + ('conflicting_geometry', models.ForeignKey(help_text='The geometry which came second', on_delete=django.db.models.deletion.CASCADE, related_name='conflicts_geometries', to='konova.geometry')), + ], + options={ + 'abstract': False, + }, + ), + ] diff --git a/konova/migrations/0002_auto_20220114_0936.py b/konova/migrations/0002_auto_20220114_0936.py new file mode 100644 index 00000000..e0b63d58 --- /dev/null +++ b/konova/migrations/0002_auto_20220114_0936.py @@ -0,0 +1,37 @@ +# Generated by Django 3.1.3 on 2022-01-14 08:36 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('user', '0001_initial'), + ('konova', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='geometry', + 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='geometry', + 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='deadline', + 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='deadline', + 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'), + ), + ] diff --git a/konova/migrations/__init__.py b/konova/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/news/migrations/0001_initial.py b/news/migrations/0001_initial.py new file mode 100644 index 00000000..6a8c0ed6 --- /dev/null +++ b/news/migrations/0001_initial.py @@ -0,0 +1,30 @@ +# Generated by Django 3.1.3 on 2022-01-14 08:36 + +from django.db import migrations, models +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='ServerMessage', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('subject', models.CharField(max_length=500)), + ('body', models.TextField()), + ('is_active', models.BooleanField(default=True)), + ('publish_on', models.DateTimeField()), + ('unpublish_on', models.DateTimeField()), + ('importance', models.CharField(choices=[('default', 'Default'), ('info', 'Info'), ('warning', 'Warning')], max_length=100)), + ], + options={ + 'abstract': False, + }, + ), + ] diff --git a/news/migrations/0002_auto_20220114_0936.py b/news/migrations/0002_auto_20220114_0936.py new file mode 100644 index 00000000..f4ce0240 --- /dev/null +++ b/news/migrations/0002_auto_20220114_0936.py @@ -0,0 +1,27 @@ +# Generated by Django 3.1.3 on 2022-01-14 08:36 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('user', '0001_initial'), + ('news', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='servermessage', + 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='servermessage', + 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'), + ), + ] diff --git a/news/migrations/__init__.py b/news/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/user/migrations/0001_initial.py b/user/migrations/0001_initial.py new file mode 100644 index 00000000..1ded2123 --- /dev/null +++ b/user/migrations/0001_initial.py @@ -0,0 +1,77 @@ +# Generated by Django 3.1.3 on 2022-01-14 08:36 + +from django.conf import settings +import django.contrib.auth.models +import django.contrib.auth.validators +from django.db import migrations, models +import django.db.models.deletion +import django.utils.timezone +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ] + + operations = [ + migrations.CreateModel( + name='User', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), + ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), + ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')), + ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')), + ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')), + ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')), + ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')), + ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')), + ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')), + ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), + ], + options={ + 'verbose_name': 'user', + 'verbose_name_plural': 'users', + 'abstract': False, + }, + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + migrations.CreateModel( + name='UserNotification', + fields=[ + ('id', models.CharField(choices=[('NOTIFY_ON_SHARED_ACCESS_REMOVED', 'NOTIFY_ON_SHARED_ACCESS_REMOVED'), ('NOTIFY_ON_SHARED_DATA_RECORDED', 'NOTIFY_ON_SHARED_DATA_RECORDED'), ('NOTIFY_ON_SHARED_DATA_DELETED', 'NOTIFY_ON_SHARED_DATA_DELETED'), ('NOTIFY_ON_SHARED_DATA_CHECKED', 'NOTIFY_ON_SHARED_DATA_CHECKED'), ('NOTIFY_ON_SHARED_ACCESS_GAINED', 'NOTIFY_ON_SHARED_ACCESS_GAINED')], max_length=500, primary_key=True, serialize=False)), + ('name', models.CharField(help_text='Human readable name', max_length=500, unique=True)), + ('is_active', models.BooleanField(default=True, help_text='Can be toggle to enable/disable this notification for all users')), + ], + ), + migrations.CreateModel( + name='UserActionLogEntry', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)), + ('timestamp', models.DateTimeField(auto_now_add=True, help_text='Timestamp of performed action')), + ('action', models.CharField(blank=True, choices=[('checked', 'Checked'), ('recorded', 'Recorded'), ('unrecorded', 'Unrecorded'), ('created', 'Created'), ('edited', 'Edited'), ('deleted', 'Deleted')], help_text='Short name for performed action - optional', max_length=255, null=True)), + ('comment', models.CharField(blank=True, help_text='Additional comment on this entry', max_length=255, null=True)), + ('user', models.ForeignKey(help_text='Performing user', on_delete=django.db.models.deletion.CASCADE, related_name='+', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ('-timestamp',), + }, + ), + migrations.AddField( + model_name='user', + name='notifications', + field=models.ManyToManyField(blank=True, related_name='_user_notifications_+', to='user.UserNotification'), + ), + migrations.AddField( + model_name='user', + name='user_permissions', + field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'), + ), + ] diff --git a/user/migrations/0002_user_api_token.py b/user/migrations/0002_user_api_token.py new file mode 100644 index 00000000..e99cc90c --- /dev/null +++ b/user/migrations/0002_user_api_token.py @@ -0,0 +1,20 @@ +# Generated by Django 3.1.3 on 2022-01-28 15:50 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0001_initial'), + ('user', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='api_token', + field=models.OneToOneField(blank=True, help_text="The user's API token", null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.apiusertoken'), + ), + ] diff --git a/user/migrations/__init__.py b/user/migrations/__init__.py new file mode 100644 index 00000000..e69de29b From aaac61f9b49905ae2cb3aaa011eeab5005d0923b Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Wed, 2 Feb 2022 09:00:38 +0100 Subject: [PATCH 2/2] # Migrations * adds migration support for detail fields on CompensationState and CompensationAction --- .../migrations/0003_auto_20220202_0846.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 compensation/migrations/0003_auto_20220202_0846.py diff --git a/compensation/migrations/0003_auto_20220202_0846.py b/compensation/migrations/0003_auto_20220202_0846.py new file mode 100644 index 00000000..8542c0eb --- /dev/null +++ b/compensation/migrations/0003_auto_20220202_0846.py @@ -0,0 +1,35 @@ +# Generated by Django 3.1.3 on 2022-02-02 07:46 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('codelist', '0001_initial'), + ('compensation', '0002_auto_20220114_0936'), + ] + + operations = [ + migrations.AddField( + model_name='compensationaction', + name='action_type_details', + field=models.ManyToManyField(blank=True, limit_choices_to={'code_lists__in': [1035], 'is_archived': False, 'is_selectable': True}, related_name='_compensationaction_action_type_details_+', to='codelist.KonovaCode'), + ), + migrations.AddField( + model_name='compensationstate', + name='biotope_type_details', + field=models.ManyToManyField(blank=True, limit_choices_to={'code_lists__in': [975], 'is_archived': False, 'is_selectable': True}, related_name='_compensationstate_biotope_type_details_+', to='codelist.KonovaCode'), + ), + migrations.AlterField( + 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, related_name='+', to='codelist.konovacode'), + ), + migrations.AlterField( + 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, related_name='+', to='codelist.konovacode'), + ), + ]