# Generated by Django 5.1.2 on 2024-12-10 12:00

from django.db import migrations


def article_to_doc_selector(apps, schema_editor):
    DocumentStyle = apps.get_model("style", "DocumentStyle")
    for style in DocumentStyle.objects.all():
        style.contents = style.contents.replace(".article-", ".doc-")
        style.save()


def doc_to_article_selector(apps, schema_editor):
    DocumentStyle = apps.get_model("style", "DocumentStyle")
    for style in DocumentStyle.objects.all():
        style.contents = style.contents.replace(".doc-", ".article-")
        style.save()


class Migration(migrations.Migration):
    dependencies = [
        ("style", "0001_squashed_20200219"),
    ]

    operations = [
        migrations.RunPython(
            article_to_doc_selector,
            doc_to_article_selector,
        ),
    ]
