From 97ba725ba227216b1d7659ce2929ff2de2a6aac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Sun, 19 Aug 2018 17:31:46 +0200 Subject: [PATCH] Add missing migrations. --- .../0069_add_bogus_email_to_old_speakers.py | 23 +++++++++++++++++++ .../migrations/0070_auto_20180819_1729.py | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 src/program/migrations/0069_add_bogus_email_to_old_speakers.py create mode 100644 src/program/migrations/0070_auto_20180819_1729.py 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), + ), + ]