1 # Generated by Django 2.2.19 on 2021-06-18 10:11
3 from django.db import migrations, models
6 def populate_method(apps, schema_editor):
7 Schedule = apps.get_model('club', 'Schedule')
8 Schedule.objects.filter(method='', monthly=False, yearly=False).update(method='payu')
9 Schedule.objects.filter(
10 models.Q(monthly=True) | models.Q(yearly=True),
12 ).update(method='payu-re')
15 class Migration(migrations.Migration):
18 ('club', '0029_schedule_method'),
22 migrations.RunPython(populate_method, migrations.RunPython.noop)