|
| 1 | +# Generated by Django 5.2.6 on 2025-09-29 08:26 |
| 2 | + |
| 3 | +from django.db import migrations |
| 4 | + |
| 5 | + |
| 6 | +def add_symptom_sub_types(apps, schema_editor): |
| 7 | + SymptomSubType = apps.get_model("participants", "SymptomSubType") |
| 8 | + |
| 9 | + SymptomSubType.objects.create( |
| 10 | + symptom_type_id="skin-change", id="sores_or_cysts", name="Sores or cysts" |
| 11 | + ) |
| 12 | + SymptomSubType.objects.create( |
| 13 | + symptom_type_id="skin-change", |
| 14 | + id="dimples_or_indentation", |
| 15 | + name="Dimples or indentation", |
| 16 | + ) |
| 17 | + SymptomSubType.objects.create(symptom_type_id="skin-change", id="rash", name="Rash") |
| 18 | + SymptomSubType.objects.create( |
| 19 | + symptom_type_id="skin-change", id="colour_change", name="Colour change" |
| 20 | + ) |
| 21 | + SymptomSubType.objects.create( |
| 22 | + symptom_type_id="skin-change", id="other", name="Otgher" |
| 23 | + ) |
| 24 | + |
| 25 | + |
| 26 | +def remove_symptom_sub_types(apps, schema_editor): |
| 27 | + SymptomSubType = apps.get_model("participants", "SymptomSubType") |
| 28 | + SymptomSubType.objects.all().delete() |
| 29 | + |
| 30 | + |
| 31 | +class Migration(migrations.Migration): |
| 32 | + |
| 33 | + dependencies = [ |
| 34 | + ("participants", "0027_alter_symptom_area"), |
| 35 | + ] |
| 36 | + |
| 37 | + operations = [migrations.RunPython(add_symptom_sub_types, remove_symptom_sub_types)] |
0 commit comments