# 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), ]