# Generated by Django 2.2.10 on 2020-05-20 10:04

from django.db import migrations

def add_collection_supp(apps, schema_editor):
    BiosourceSamplingProcess = apps.get_model("majora2", "BiosourceSamplingProcess")
    COGUK_BiosourceSamplingProcessSupplement = apps.get_model("majora2", "COGUK_BiosourceSamplingProcessSupplement")
    for collection in BiosourceSamplingProcess.objects.all():
        if not hasattr(collection, "coguk_supp"):
            c = COGUK_BiosourceSamplingProcessSupplement(sampling=collection)
            c.save()

class Migration(migrations.Migration):

    dependencies = [
        ('majora2', '0084_auto_20200520_1004'),
    ]

    operations = [
        migrations.RunPython(add_collection_supp),
    ]
