1 # Generated by Django 4.0.8 on 2026-03-31 11:10
3 from django.db import migrations
5 def data_campaign(apps, schema_editor):
6 Banner = apps.get_model('annoy', 'Banner')
7 Campaign = apps.get_model('annoy', 'Campaign')
8 for b in Banner.objects.exclude(target=None):
10 b.campaign = Campaign.objects.create(name='auto')
14 c.progress = b.progress
20 def data_campaign_rev(apps, schema_editor):
21 Banner = apps.get_model('annoy', 'Banner')
22 Campaign = apps.get_model('annoy', 'Campaign')
23 for c in Campaign.objects.exclude(target=None):
24 for b in c.banner_set.all():
26 b.progress = c.progress
30 class Migration(migrations.Migration):
33 ('annoy', '0020_campaign_end_campaign_landing_campaign_priority_and_more'),