# Generated by Django 2.2.17 on 2021-03-10 19:38

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('workshops', '0234_auto_20210228_0940'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='event',
            name='sponsors',
        ),
        migrations.AddField(
            model_name='event',
            name='sponsor',
            field=models.ForeignKey(blank=False, help_text='Institution that is funding or organising the workshop.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='sponsored_events', to='workshops.Organization'),
        ),
        migrations.AlterField(
            model_name='event',
            name='administrator',
            field=models.ForeignKey(blank=False, help_text='Lesson Program administered for this workshop.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='administered_events', to='workshops.Organization'),
        ),
        migrations.AlterField(
            model_name='event',
            name='host',
            field=models.ForeignKey(help_text='Organisation hosting the event.', on_delete=django.db.models.deletion.PROTECT, related_name='hosted_events', to='workshops.Organization'),
        ),
        migrations.DeleteModel(
            name='Sponsorship',
        ),
    ]

@@ -119,16 +119,264 @@
 etion%0A%0A%0A
+def create_event_host_to_sponsor(apps, schema_editor):%0A    %22%22%22Copy event.host to event.sponsor for existing events.%22%22%22%0A    Event = apps.get_model(%22workshops%22, %22Event%22)%0A    Event.objects.exclude(host__isnull=True).update(sponsor=models.F('host'))%0A%0A%0A
 class Mi
@@ -937,32 +937,119 @@
 n'),%0A        ),%0A
+        migrations.RunPython(create_event_host_to_sponsor, migrations.RunPython.noop),%0A
         migratio

Add data migration for event.sponsor