summaryrefslogtreecommitdiff
path: root/archaeological_context_records/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_context_records/migrations')
-rw-r--r--archaeological_context_records/migrations/0109_contextrecord_excavation_technics.py26
-rw-r--r--archaeological_context_records/migrations/0110_auto_20221017_1435.py21
2 files changed, 47 insertions, 0 deletions
diff --git a/archaeological_context_records/migrations/0109_contextrecord_excavation_technics.py b/archaeological_context_records/migrations/0109_contextrecord_excavation_technics.py
new file mode 100644
index 000000000..2179eb558
--- /dev/null
+++ b/archaeological_context_records/migrations/0109_contextrecord_excavation_technics.py
@@ -0,0 +1,26 @@
+# Generated by Django 2.2.24 on 2022-10-17 12:22
+
+from django.db import migrations, models
+
+
+def migrate(apps, schema_editor):
+ ContextRecord = apps.get_model('archaeological_context_records', 'ContextRecord')
+ for cr in ContextRecord.objects.filter(excavation_technic__isnull=False).all():
+ cr.excavation_technics.add(cr.excavation_technic)
+
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_context_records', '0108_auto_20220707_1633'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='contextrecord',
+ name='excavation_technics',
+ field=models.ManyToManyField(blank=True, related_name='context_records', to='archaeological_context_records.ExcavationTechnicType', verbose_name='Excavation technique'),
+ ),
+ migrations.RunPython(migrate),
+ ]
diff --git a/archaeological_context_records/migrations/0110_auto_20221017_1435.py b/archaeological_context_records/migrations/0110_auto_20221017_1435.py
new file mode 100644
index 000000000..c9f7f76a2
--- /dev/null
+++ b/archaeological_context_records/migrations/0110_auto_20221017_1435.py
@@ -0,0 +1,21 @@
+# Generated by Django 2.2.24 on 2022-10-17 14:35
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_context_records', '0109_contextrecord_excavation_technics'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='contextrecord',
+ name='excavation_technic',
+ ),
+ migrations.RemoveField(
+ model_name='historicalcontextrecord',
+ name='excavation_technic',
+ ),
+ ]