# Generated by Django 5.2.8 on 2025-11-20 23:27

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('igny8_core_auth', '0001_initial'),
        ('planner', '0001_initial'),
        # ('site_building', '0001_initial'),  # REMOVED: SiteBuilder deprecated
    ]

    operations = [
        # REMOVED: ContentIdeas.taxonomy FK to SiteBlueprintTaxonomy (legacy blueprint)
        migrations.AddField(
            model_name='keywords',
            name='account',
            field=models.ForeignKey(db_column='tenant_id', on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_set', to='igny8_core_auth.account'),
        ),
        migrations.AddField(
            model_name='keywords',
            name='cluster',
            field=models.ForeignKey(blank=True, limit_choices_to={'sector': models.F('sector')}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='keywords', to='planner.clusters'),
        ),
        migrations.AddField(
            model_name='keywords',
            name='sector',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_set', to='igny8_core_auth.sector'),
        ),
        migrations.AddField(
            model_name='keywords',
            name='seed_keyword',
            field=models.ForeignKey(help_text='Reference to the global seed keyword', on_delete=django.db.models.deletion.PROTECT, related_name='site_keywords', to='igny8_core_auth.seedkeyword'),
        ),
        migrations.AddField(
            model_name='keywords',
            name='site',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_set', to='igny8_core_auth.site'),
        ),
        migrations.AddField(
            model_name='contentideas',
            name='keyword_objects',
            field=models.ManyToManyField(blank=True, help_text='Individual keywords linked to this content idea', related_name='content_ideas', to='planner.keywords'),
        ),
        migrations.AddIndex(
            model_name='clusters',
            index=models.Index(fields=['name'], name='igny8_clust_name_0f98bb_idx'),
        ),
        migrations.AddIndex(
            model_name='clusters',
            index=models.Index(fields=['status'], name='igny8_clust_status_c50486_idx'),
        ),
        migrations.AddIndex(
            model_name='clusters',
            index=models.Index(fields=['site', 'sector'], name='igny8_clust_site_id_a9aee3_idx'),
        ),
        migrations.AddIndex(
            model_name='clusters',
            index=models.Index(fields=['context_type'], name='igny8_clust_context_0d6bd7_idx'),
        ),
        migrations.AddIndex(
            model_name='keywords',
            index=models.Index(fields=['seed_keyword'], name='igny8_keywo_seed_ke_919a9d_idx'),
        ),
        migrations.AddIndex(
            model_name='keywords',
            index=models.Index(fields=['status'], name='igny8_keywo_status_9a0dd6_idx'),
        ),
        migrations.AddIndex(
            model_name='keywords',
            index=models.Index(fields=['cluster'], name='igny8_keywo_cluster_d1ea95_idx'),
        ),
        migrations.AddIndex(
            model_name='keywords',
            index=models.Index(fields=['site', 'sector'], name='igny8_keywo_site_id_7bcb63_idx'),
        ),
        migrations.AddIndex(
            model_name='keywords',
            index=models.Index(fields=['seed_keyword', 'site', 'sector'], name='igny8_keywo_seed_ke_69146b_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='keywords',
            unique_together={('seed_keyword', 'site', 'sector')},
        ),
        migrations.AddIndex(
            model_name='contentideas',
            index=models.Index(fields=['idea_title'], name='igny8_conte_idea_ti_1e15a5_idx'),
        ),
        migrations.AddIndex(
            model_name='contentideas',
            index=models.Index(fields=['status'], name='igny8_conte_status_6be5bc_idx'),
        ),
        migrations.AddIndex(
            model_name='contentideas',
            index=models.Index(fields=['keyword_cluster'], name='igny8_conte_keyword_4d2151_idx'),
        ),
        migrations.AddIndex(
            model_name='contentideas',
            index=models.Index(fields=['content_structure'], name='igny8_conte_content_3eede7_idx'),
        ),
        migrations.AddIndex(
            model_name='contentideas',
            index=models.Index(fields=['site_entity_type'], name='igny8_conte_site_en_511349_idx'),
        ),
        migrations.AddIndex(
            model_name='contentideas',
            index=models.Index(fields=['cluster_role'], name='igny8_conte_cluster_234240_idx'),
        ),
        migrations.AddIndex(
            model_name='contentideas',
            index=models.Index(fields=['site', 'sector'], name='igny8_conte_site_id_03b520_idx'),
        ),
    ]
