# Generated by Django 6.0 on 2025-12-29 21:22

from django.db import migrations, models
from django.contrib.postgres.operations import (
    AddIndexConcurrently,
    RemoveIndexConcurrently,
)


class Migration(migrations.Migration):
    atomic = False

    dependencies = [
        ("thl_django", "0002_surveystat_is_live_alter_surveycategory_strength_and_more"),
    ]

    operations = [
        RemoveIndexConcurrently(
            model_name="surveystat",
            name="surveystat_live_survey_idx",
        ),
        migrations.RenameField(
            model_name="surveystat",
            old_name="is_live",
            new_name="survey_is_live",
        ),
        migrations.AddField(
            model_name="surveystat",
            name="survey_source",
            field=models.CharField(max_length=2, null=True),
        ),
        migrations.AddField(
            model_name="surveystat",
            name="survey_survey_id",
            field=models.CharField(max_length=32, null=True),
        ),
        AddIndexConcurrently(
            model_name="surveystat",
            index=models.Index(
                condition=models.Q(("survey_is_live", True)),
                fields=["survey"],
                name="surveystat_live_survey_idx",
            ),
        ),
    ]
