diff --git a/src/program/migrations/0069_add_bogus_email_to_old_speakers.py b/src/program/migrations/0069_add_bogus_email_to_old_speakers.py new file mode 100644 index 00000000..94974a75 --- /dev/null +++ b/src/program/migrations/0069_add_bogus_email_to_old_speakers.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1 on 2018-08-19 15:14 + +from django.db import migrations + + +def add_bogus_email(apps, schema_editor): + Speaker = apps.get_model('program', 'Speaker') + + for speaker in Speaker.objects.all(): + if not speaker.email: + speaker.email = "N/A" + speaker.save() + + +class Migration(migrations.Migration): + + dependencies = [ + ('program', '0068_add_email_to_speaker_and_speaker_proposal'), + ] + + operations = [ + migrations.RunPython(add_bogus_email) + ] diff --git a/src/program/migrations/0070_auto_20180819_1729.py b/src/program/migrations/0070_auto_20180819_1729.py new file mode 100644 index 00000000..3b01d175 --- /dev/null +++ b/src/program/migrations/0070_auto_20180819_1729.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1 on 2018-08-19 15:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('program', '0069_add_bogus_email_to_old_speakers'), + ] + + operations = [ + migrations.AlterField( + model_name='speaker', + name='email', + field=models.EmailField(help_text='The email of the speaker.', max_length=150), + ), + migrations.AlterField( + model_name='speakerproposal', + name='email', + field=models.EmailField(help_text='The email of the speaker (defaults to the logged in user if empty.', max_length=150), + ), + ]