# Generated by Django 4.2.23 on 2025-09-22 04:41

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ("analyzer", "0013_sync_analyzer_input_schemas"),
    ]

    operations = [
        # Analysis queries
        migrations.RunSQL(
            "CREATE INDEX IF NOT EXISTS idx_analysis_corpus "
            "ON analyzer_analysis(analyzed_corpus_id, status);",
            reverse_sql="DROP INDEX IF EXISTS idx_analysis_corpus;",
        ),
        migrations.RunSQL(
            "CREATE INDEX IF NOT EXISTS idx_analysis_public "
            "ON analyzer_analysis(is_public, status) "
            "WHERE is_public = TRUE;",
            reverse_sql="DROP INDEX IF EXISTS idx_analysis_public;",
        ),
        migrations.RunSQL(
            "CREATE INDEX IF NOT EXISTS idx_analysis_creator "
            "ON analyzer_analysis(creator_id, status);",
            reverse_sql="DROP INDEX IF EXISTS idx_analysis_creator;",
        ),
    ]
