# Generated by Django 4.2.9 on 2025-02-01 14:32

from django.db import migrations, models

def rename_c3c(apps, schema_editor):
    RecurrentImport = apps.get_model("agenda_culturel", "RecurrentImport")

    for instance in RecurrentImport.objects.all():
        if str(instance.processor) == "cour3coquins":
            instance.processor = "Billetterie CF"
            instance.save()

def rename_c3c_backward(apps, schema_editor):
    RecurrentImport = apps.get_model("agenda_culturel", "RecurrentImport")

    for instance in RecurrentImport.objects.all():
        if str(instance.processor) == "Billetterie CF":
            instance.processor = "cour3coquins"
            instance.save()

class Migration(migrations.Migration):

    dependencies = [
        ('agenda_culturel', '0140_alter_event_created_by_user_and_more'),
    ]

    operations = [
        migrations.AlterField(
            model_name='recurrentimport',
            name='processor',
            field=models.CharField(choices=[('ical', 'ical'), ('icalnobusy', 'ical no busy'), ('icalnovc', 'ical no VC'), ('lacoope', 'lacoope.org'), ('lacomedie', 'la comédie'), ('lefotomat', 'le fotomat'), ('lapucealoreille', "la puce à l'oreille"), ('Plugin wordpress MEC', 'Plugin wordpress MEC'), ('Facebook events', "Événements d'une page FB"), ('Billetterie CF', 'Billetterie Clermont-Ferrand'), ('arachnee', 'Arachnée concert'), ('rio', 'Le Rio'), ('raymonde', 'La Raymonde'), ('apidae', 'Agenda apidae tourisme'), ('iguana', 'Agenda iguana (médiathèques)')], default='ical', max_length=20, verbose_name='Processor'),
        ),
        migrations.RunPython(
            rename_c3c,
            rename_c3c_backward,
        ),
    ]
