Add missing migrations.
This commit is contained in:
parent
62d172f6c2
commit
97ba725ba2
|
@ -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)
|
||||||
|
]
|
23
src/program/migrations/0070_auto_20180819_1729.py
Normal file
23
src/program/migrations/0070_auto_20180819_1729.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in a new issue