Features: 1) Add database indices for improved query performance on order, orderproduct, product, and vendor models; 2) Update name fields across multiple languages in product model to include db_index and enhanced help text.
Fixes: None; Extra: Generated new migration `0045_alter_product_name_alter_product_name_ar_ar_and_more`.
This commit is contained in:
parent
c263182414
commit
c78e0e8137
1 changed files with 376 additions and 0 deletions
|
|
@ -0,0 +1,376 @@
|
|||
# Generated by Django 5.2 on 2025-10-17 11:27
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("core", "0044_vendor_last_processing_response"),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_ar_ar",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_cs_cz",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_da_dk",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_de_de",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_en_gb",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_en_us",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_es_es",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_fa_ir",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_fr_fr",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_he_il",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_hi_in",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_hr_hr",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_id_id",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_it_it",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_ja_jp",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_kk_kz",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_ko_kr",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_nl_nl",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_no_no",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_pl_pl",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_pt_br",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_ro_ro",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_ru_ru",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_sv_se",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_th_th",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_tr_tr",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_vi_vn",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="product",
|
||||
name="name_zh_hans",
|
||||
field=models.CharField(
|
||||
db_index=True,
|
||||
help_text="provide a clear identifying name for the product",
|
||||
max_length=255,
|
||||
null=True,
|
||||
verbose_name="product name",
|
||||
),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="order",
|
||||
index=models.Index(
|
||||
fields=["user", "status"], name="core_order_user_id_4407f8_idx"
|
||||
),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="order",
|
||||
index=models.Index(
|
||||
fields=["status", "buy_time"], name="core_order_status_4a088a_idx"
|
||||
),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="orderproduct",
|
||||
index=models.Index(
|
||||
fields=["order", "status"], name="core_orderp_order_i_d16192_idx"
|
||||
),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="orderproduct",
|
||||
index=models.Index(
|
||||
fields=["product", "status"], name="core_orderp_product_ee8abb_idx"
|
||||
),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="product",
|
||||
index=models.Index(
|
||||
fields=["is_active", "brand", "category"],
|
||||
name="core_produc_is_acti_9d27c3_idx",
|
||||
),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="product",
|
||||
index=models.Index(fields=["slug"], name="core_produc_slug_42f8f6_idx"),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="product",
|
||||
index=models.Index(fields=["sku"], name="core_produc_sku_a1eae6_idx"),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="vendor",
|
||||
index=models.Index(fields=["name"], name="core_vendor_name_91f195_idx"),
|
||||
),
|
||||
]
|
||||
Loading…
Reference in a new issue