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

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


class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        ('country', '0006_remove_country_country_cou_alpha_2_398383_idx_and_more'),
        ('region', '0006_rename_region_created_at_idx_region_created_at_ix_and_more'),
        ('user', '0013_alter_useraddress_floor_and_more'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='useraddress',
            options={'ordering': ['-is_main'], 'verbose_name': 'User Address', 'verbose_name_plural': 'User Addresses'},
        ),
        migrations.RemoveIndex(
            model_name='useraccount',
            name='user_account_trgm_idx',
        ),
        migrations.RenameIndex(
            model_name='useraccount',
            new_name='useraccount_created_at_ix',
            old_name='useraccount_created_at_idx',
        ),
        migrations.RenameIndex(
            model_name='useraccount',
            new_name='useraccount_updated_at_ix',
            old_name='useraccount_updated_at_idx',
        ),
        migrations.RenameIndex(
            model_name='useraddress',
            new_name='useraddress_created_at_ix',
            old_name='useraddress_created_at_idx',
        ),
        migrations.RenameIndex(
            model_name='useraddress',
            new_name='useraddress_updated_at_ix',
            old_name='useraddress_updated_at_idx',
        ),
        migrations.RenameIndex(
            model_name='useraddress',
            new_name='user_address_search_gin',
            old_name='address_search_gin',
        ),
        migrations.AddIndex(
            model_name='useraccount',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['email'], name='user_account_email_ix'),
        ),
        migrations.AddIndex(
            model_name='useraccount',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['username'], name='user_account_username_ix'),
        ),
        migrations.AddIndex(
            model_name='useraccount',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['is_active'], name='user_account_is_active_ix'),
        ),
        migrations.AddIndex(
            model_name='useraccount',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['is_staff'], name='user_account_is_staff_ix'),
        ),
        migrations.AddIndex(
            model_name='useraccount',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['country'], name='user_account_country_ix'),
        ),
        migrations.AddIndex(
            model_name='useraccount',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['region'], name='user_account_region_ix'),
        ),
        migrations.AddIndex(
            model_name='useraccount',
            index=django.contrib.postgres.indexes.GinIndex(fields=['email', 'username'], name='user_account_identity_gin_ix', opclasses=['gin_trgm_ops', 'gin_trgm_ops']),
        ),
        migrations.AddIndex(
            model_name='useraccount',
            index=django.contrib.postgres.indexes.GinIndex(fields=['first_name', 'last_name'], name='user_account_name_gin_ix', opclasses=['gin_trgm_ops', 'gin_trgm_ops']),
        ),
        migrations.AddIndex(
            model_name='useraccount',
            index=django.contrib.postgres.indexes.GinIndex(fields=['city', 'zipcode', 'address', 'place'], name='user_account_location_gin_ix', opclasses=['gin_trgm_ops', 'gin_trgm_ops', 'gin_trgm_ops', 'gin_trgm_ops']),
        ),
        migrations.AddIndex(
            model_name='useraddress',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['user'], name='user_address_user_ix'),
        ),
        migrations.AddIndex(
            model_name='useraddress',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['is_main'], name='user_address_is_main_ix'),
        ),
        migrations.AddIndex(
            model_name='useraddress',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['country'], name='user_address_country_ix'),
        ),
        migrations.AddIndex(
            model_name='useraddress',
            index=django.contrib.postgres.indexes.BTreeIndex(fields=['region'], name='user_address_region_ix'),
        ),
    ]
