Add missing migrations.

This commit is contained in:
Víðir Valberg Guðmundsson 2018-08-19 17:31:46 +02:00
parent 62d172f6c2
commit 97ba725ba2
2 changed files with 46 additions and 0 deletions

View file

@ -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)
]

View file

@ -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),
),
]