# Generated by Django 5.2.1 on 2025-05-14 20:33

import django.contrib.postgres.indexes
from django.conf import settings
from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0021_alter_historicalproduct_seo_description_and_more'),
        ('vat', '0006_rename_vat_created_at_idx_vat_created_at_ix_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='productfavourite',
            options={'ordering': ['-created_at'], 'verbose_name': 'Product Favourite', 'verbose_name_plural': 'Product Favourites'},
        ),
        migrations.RemoveIndex(
            model_name='product',
            name='product_product_code_idx',
        ),
        migrations.RemoveIndex(
            model_name='product',
            name='product_slug_idx',
        ),
        migrations.RemoveIndex(
            model_name='product',
            name='product_price_stock_idx',
        ),
        migrations.RenameIndex(
            model_name='product',
            new_name='product_p_meta_ix',
            old_name='product_p_meta_idx',
        ),
        migrations.RenameIndex(
            model_name='product',
            new_name='product_meta_ix',
            old_name='product_meta_idx',
        ),
        migrations.RenameIndex(
            model_name='product',
            new_name='product_created_at_ix',
            old_name='product_created_at_idx',
        ),
        migrations.RenameIndex(
            model_name='product',
            new_name='product_updated_at_ix',
            old_name='product_updated_at_idx',
        ),
        migrations.RenameIndex(
            model_name='product',
            new_name='product_price_ix',
            old_name='product_pro_price_9daef3_btree',
        ),
        migrations.RenameIndex(
            model_name='product',
            new_name='product_stock_ix',
            old_name='product_pro_stock_c26e64_btree',
        ),
        migrations.RenameIndex(
            model_name='product',
            new_name='product_discount_ix',
            old_name='product_pro_discoun_63d416_btree',
        ),
        migrations.RenameIndex(
            model_name='product',
            new_name='product_view_count_ix',
            old_name='product_pro_view_co_bf71fd_btree',
        ),
        migrations.RenameIndex(
            model_name='product',
            new_name='product_weight_ix',
            old_name='product_pro_weight_bf3d6d_btree',
        ),
        migrations.RenameIndex(
            model_name='productcategory',
            new_name='productcategory_created_at_ix',
            old_name='productcategory_created_at_idx',
        ),
        migrations.RenameIndex(
            model_name='productcategory',
            new_name='productcategory_updated_at_ix',
            old_name='productcategory_updated_at_idx',
        ),
        migrations.RenameIndex(
            model_name='productcategory',
            new_name='productcategory_sort_order_ix',
            old_name='productcategory_sort_order_idx',
        ),
        migrations.RenameIndex(
            model_name='productfavourite',
            new_name='productfavourite_created_at_ix',
            old_name='productfavourite_created_at_idx',
        ),
        migrations.RenameIndex(
            model_name='productfavourite',
            new_name='productfavourite_updated_at_ix',
            old_name='productfavourite_updated_at_idx',
        ),
        migrations.RenameIndex(
            model_name='productimage',
            new_name='productimage_created_at_ix',
            old_name='productimage_created_at_idx',
        ),
        migrations.RenameIndex(
            model_name='productimage',
            new_name='productimage_updated_at_ix',
            old_name='productimage_updated_at_idx',
        ),
        migrations.RenameIndex(
            model_name='productimage',
            new_name='productimage_sort_order_ix',
            old_name='productimage_sort_order_idx',
        ),
        migrations.RenameIndex(
            model_name='productimage',
            new_name='prod_img_product_is_main_ix',
            old_name='product_pro_product_5068ba_btree',
        ),
        migrations.RenameIndex(
            model_name='productreview',
            new_name='productreview_created_at_ix',
            old_name='productreview_created_at_idx',
        ),
        migrations.RenameIndex(
            model_name='productreview',
            new_name='productreview_updated_at_ix',
            old_name='productreview_updated_at_idx',
        ),
        migrations.RenameIndex(
            model_name='productreview',
            new_name='productreview_published_at_ix',
            old_name='productreview_published_at_idx',
        ),
        migrations.RenameIndex(
            model_name='productreview',
            new_name='productreview_is_published_ix',
            old_name='productreview_is_published_idx',
        ),
        migrations.RenameIndex(
            model_name='productreview',
            new_name='product_review_status_ix',
            old_name='product_pro_status_8c2214_btree',
        ),
        migrations.RenameIndex(
            model_name='productreview',
            new_name='product_review_rate_ix',
            old_name='product_pro_rate_b78d32_btree',
        ),
        migrations.AddIndex(
            model_name='product',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['price', 'stock'], name='product_price_stock_ix'),
        ),
        migrations.AddIndex(
            model_name='product',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['product_code'], name='product_product_code_ix'),
        ),
        migrations.AddIndex(
            model_name='product',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['slug'], name='product_slug_ix'),
        ),
        migrations.AddIndex(
            model_name='product',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['active'], name='product_active_ix'),
        ),
        migrations.AddIndex(
            model_name='product',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['category'], name='product_category_ix'),
        ),
        migrations.AddIndex(
            model_name='product',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['active', 'price'], name='product_active_price_ix'),
        ),
        migrations.AddIndex(
            model_name='productcategory',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['slug'], name='product_category_slug_ix'),
        ),
        migrations.AddIndex(
            model_name='productcategory',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['parent'], name='product_category_parent_ix'),
        ),
        migrations.AddIndex(
            model_name='productfavourite',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['user'], name='product_favourite_user_ix'),
        ),
        migrations.AddIndex(
            model_name='productfavourite',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['product'], name='product_favourite_product_ix'),
        ),
        migrations.AddIndex(
            model_name='productreview',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['product'], name='product_review_product_ix'),
        ),
        migrations.AddIndex(
            model_name='productreview',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['user'], name='product_review_user_ix'),
        ),
        migrations.AddIndex(
            model_name='productreview',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['product', 'status'], name='prod_rev_product_status_ix'),
        ),
        migrations.AddIndex(
            model_name='productreview',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['product', 'rate'], name='prod_rev_product_rate_ix'),
        ),
    ]
