summaryrefslogtreecommitdiff
path: root/archaeological_finds/migrations/0040_auto_20181120_1027.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-01-29 17:41:48 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2020-07-01 18:02:28 +0200
commit49e87a9cb4e32c30e004dbf87f1b8f4d8326282f (patch)
treecd63cc6c0ed2e4d907c0026ea00682067064912b /archaeological_finds/migrations/0040_auto_20181120_1027.py
parenta3c9b4a707d80c6ba043c11703f8af46ccb6d16c (diff)
downloadIshtar-49e87a9cb4e32c30e004dbf87f1b8f4d8326282f.tar.bz2
Ishtar-49e87a9cb4e32c30e004dbf87f1b8f4d8326282f.zip
Finish migration refactoring
Diffstat (limited to 'archaeological_finds/migrations/0040_auto_20181120_1027.py')
-rw-r--r--archaeological_finds/migrations/0040_auto_20181120_1027.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/archaeological_finds/migrations/0040_auto_20181120_1027.py b/archaeological_finds/migrations/0040_auto_20181120_1027.py
deleted file mode 100644
index fd649dd8f..000000000
--- a/archaeological_finds/migrations/0040_auto_20181120_1027.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.11.10 on 2018-11-20 10:27
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-def init_create_new_find(apps, schema):
- TreatmentType = apps.get_model('archaeological_finds', 'TreatmentType')
- for tp in TreatmentType.objects.all():
- if (tp.upstream_is_many or tp.downstream_is_many) and not tp.virtual:
- tp.create_new_find = True
- tp.save()
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('archaeological_finds', '0039_auto_20181115_1649'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='treatment',
- options={'ordering': ('start_date',), 'permissions': (('view_treatment', 'Can view all Treatments'), ('view_own_treatment', 'Can view own Treatment'), ('add_own_treatment', 'Can add own Treatment'), ('change_own_treatment', 'Can change own Treatment'), ('delete_own_treatment', 'Can delete own Treatment')), 'verbose_name': 'Treatment', 'verbose_name_plural': 'Treatments'},
- ),
- migrations.AddField(
- model_name='treatmenttype',
- name='create_new_find',
- field=models.BooleanField(default=False, help_text='If True when this treatment is applied a new version of the object will be created.', verbose_name='Create a new find'),
- ),
- migrations.RunPython(init_create_new_find)
- ]