# Generated by Django 5.0.3 on 2024-03-31 12:31
import django.contrib.postgres.indexes
from django.conf import settings
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("country", "0002_country_country_created_at_idx_and_more"),
        ("order", "0003_initial"),
        ("pay_way", "0002_payway_payway_created_at_idx_and_more"),
        ("product", "0008_product_product_created_at_idx_and_more"),
        ("region", "0002_region_region_created_at_idx_and_more"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddIndex(
            model_name="order",
            index=django.contrib.postgres.indexes.BTreeIndex(
                fields=["created_at"], name="order_created_at_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="order",
            index=django.contrib.postgres.indexes.BTreeIndex(
                fields=["updated_at"], name="order_updated_at_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="order",
            index=django.contrib.postgres.indexes.BTreeIndex(
                fields=["status"], name="order_order_status_3ebebc_btree"
            ),
        ),
        migrations.AddIndex(
            model_name="order",
            index=django.contrib.postgres.indexes.BTreeIndex(
                fields=["document_type"],
                name="order_order_documen_0efd90_btree",
            ),
        ),
        migrations.AddIndex(
            model_name="order",
            index=django.contrib.postgres.indexes.GinIndex(
                fields=[
                    "first_name",
                    "last_name",
                    "email",
                    "phone",
                    "mobile_phone",
                    "street",
                    "city",
                    "zipcode",
                    "place",
                ],
                name="order_search_gin",
                opclasses=[
                    "gin_trgm_ops",
                    "gin_trgm_ops",
                    "gin_trgm_ops",
                    "gin_trgm_ops",
                    "gin_trgm_ops",
                    "gin_trgm_ops",
                    "gin_trgm_ops",
                    "gin_trgm_ops",
                    "gin_trgm_ops",
                ],
            ),
        ),
        migrations.AddIndex(
            model_name="orderitem",
            index=django.contrib.postgres.indexes.BTreeIndex(
                fields=["created_at"], name="orderitem_created_at_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="orderitem",
            index=django.contrib.postgres.indexes.BTreeIndex(
                fields=["updated_at"], name="orderitem_updated_at_idx"
            ),
        ),
        migrations.AddIndex(
            model_name="orderitem",
            index=django.contrib.postgres.indexes.BTreeIndex(
                fields=["sort_order"], name="orderitem_sort_order_idx"
            ),
        ),
    ]
