# Generated migration for Phase 3 - Mark deprecated fields

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('writer', '0004_phase2_migrate_data_to_unified_structure'),
    ]

    operations = [
        # Keep deprecated fields for backward compatibility but mark them
        # We'll remove them in a future migration after ensuring no dependencies
        
        # Mark old Task fields as deprecated with help_text
        migrations.AlterField(
            model_name='tasks',
            name='content',
            field=models.TextField(
                blank=True,
                null=True,
                help_text="DEPRECATED: Use Content model instead"
            ),
        ),
        migrations.AlterField(
            model_name='tasks',
            name='word_count',
            field=models.IntegerField(
                default=0,
                help_text="DEPRECATED: Use Content.word_count instead"
            ),
        ),
        migrations.AlterField(
            model_name='tasks',
            name='meta_title',
            field=models.CharField(
                max_length=255,
                blank=True,
                null=True,
                help_text="DEPRECATED: Use Content.meta_title instead"
            ),
        ),
        migrations.AlterField(
            model_name='tasks',
            name='meta_description',
            field=models.TextField(
                blank=True,
                null=True,
                help_text="DEPRECATED: Use Content.meta_description instead"
            ),
        ),
        migrations.AlterField(
            model_name='tasks',
            name='assigned_post_id',
            field=models.IntegerField(
                null=True,
                blank=True,
                help_text="DEPRECATED: Use Content.external_id instead"
            ),
        ),
        migrations.AlterField(
            model_name='tasks',
            name='post_url',
            field=models.URLField(
                blank=True,
                null=True,
                help_text="DEPRECATED: Use Content.external_url instead"
            ),
        ),
        migrations.AlterField(
            model_name='tasks',
            name='entity_type',
            field=models.CharField(
                max_length=50,
                blank=True,
                null=True,
                db_index=True,
                help_text="DEPRECATED: Use Content.entity_type instead"
            ),
        ),
        migrations.AlterField(
            model_name='tasks',
            name='cluster_role',
            field=models.CharField(
                max_length=50,
                blank=True,
                null=True,
                help_text="DEPRECATED: Use Content.cluster_role instead"
            ),
        ),
        migrations.AlterField(
            model_name='tasks',
            name='content_structure',
            field=models.CharField(
                max_length=50,
                default='blog_post',
                help_text="DEPRECATED: Merged into Content.content_format"
            ),
        ),
        migrations.AlterField(
            model_name='tasks',
            name='content_type',
            field=models.CharField(
                max_length=50,
                default='blog_post',
                help_text="DEPRECATED: Merged into Content.entity_type + content_format"
            ),
        ),
        
        # Mark old Content fields as deprecated
        migrations.AlterField(
            model_name='content',
            name='categories',
            field=models.JSONField(
                default=list,
                blank=True,
                help_text="DEPRECATED: Use Content.taxonomies M2M instead"
            ),
        ),
        migrations.AlterField(
            model_name='content',
            name='tags',
            field=models.JSONField(
                default=list,
                blank=True,
                help_text="DEPRECATED: Use Content.taxonomies M2M instead"
            ),
        ),
    ]

