# Generated by Django 2.1.7 on 2019-08-18 07:40

from django.db import migrations, models


def migrate_travel_exp_management(apps, schema_editor):
    """Migrate options previously with no contents (displayed as "Other:")
    to a new contents ("other")."""
    WorkshopRequest = apps.get_model('workshops',
                                     'WorkshopRequest')
    WorkshopRequest.objects.filter(travel_expences_management="") \
                           .update(travel_expences_management="other")


def migrate_institutional_restrictions(apps, schema_editor):
    """Migrate options previously with no contents (displayed as "Other:")
    to a new contents ("other")."""
    WorkshopRequest = apps.get_model('workshops',
                                     'WorkshopRequest')
    WorkshopRequest.objects.filter(institution_restrictions="") \
                           .update(institution_restrictions="other")


class Migration(migrations.Migration):

    dependencies = [
        ('workshops', '0193_auto_20190811_0708'),
    ]

    operations = [
        migrations.AlterField(
            model_name='workshoprequest',
            name='institution_restrictions',
            field=models.CharField(choices=[('no_restrictions', 'No restrictions'), ('other', 'Other:')], default='', max_length=20, verbose_name='Our instructors live, teach, and travel globally. We understand that institutions may have citizenship or other requirements for employees or volunteers who facilitate workshops. If your institution fits this description, please share your requirements or note that there are no restrictions.'),
        ),
        migrations.RunPython(migrate_institutional_restrictions),
        migrations.AlterField(
            model_name='workshoprequest',
            name='travel_expences_management',
            field=models.CharField(choices=[('booked', 'Hotel and airfare will be booked by site; ground travel and meals/incidentals will be reimbursed within 60 days.'), ('reimbursed', 'All expenses will be booked by instructors and reimbursed within 60 days.'), ('other', 'Other:')], default='', max_length=20, verbose_name='How will you manage travel expenses for Carpentries Instructors?'),
        ),
        migrations.RunPython(migrate_travel_exp_management),
    ]
