# Generated by Django 3.2.19 on 2024-01-25 14:04

from django.db import migrations


def transfer_tags(apps, schema_editor):
    Article = apps.get_model('webapp.Article')
    
    for article in Article.objects.all():
        article.tags.set(article.tags_old.all())


def rollback_transfer(apps, schema_editor):
    Article = apps.get_model('webapp.Article')
    
    for article in Article.objects.all():
        article.tags_old.set(article.tags.all())


class Migration(migrations.Migration):

    dependencies = [
        ('webapp', '0007_auto_20240125_1402'),
    ]

    operations = [
        migrations.RunPython(transfer_tags, rollback_transfer)
    ]
