# 性能优化：为评论模型添加数据库索引
# Generated manually for performance optimization

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('comments', '0001_initial'),
    ]

    operations = [
        # 为 Comment 模型添加组合索引
        migrations.AddIndex(
            model_name='comment',
            index=models.Index(fields=['article', 'is_enable'], name='comment_article_enable_idx'),
        ),
        migrations.AddIndex(
            model_name='comment',
            index=models.Index(fields=['is_enable', '-id'], name='comment_enable_id_idx'),
        ),
    ]
