Features: 1) Add multiple database indexes to enhance query performance for models order, orderproduct, and product.
Fixes: 1) Remove redundant blank line in migration file. Extra: 1) Simplify index definition formatting for better readability.
This commit is contained in:
parent
ef8fdd6347
commit
efeab3e426
1 changed files with 4 additions and 13 deletions
|
|
@ -5,7 +5,6 @@ from django.db import migrations, models
|
|||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("core", "0044_vendor_last_processing_response"),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
|
|
@ -332,27 +331,19 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
migrations.AddIndex(
|
||||
model_name="order",
|
||||
index=models.Index(
|
||||
fields=["user", "status"], name="core_order_user_id_4407f8_idx"
|
||||
),
|
||||
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"
|
||||
),
|
||||
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"
|
||||
),
|
||||
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"
|
||||
),
|
||||
index=models.Index(fields=["product", "status"], name="core_orderp_product_ee8abb_idx"),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="product",
|
||||
|
|
|
|||
Loading…
Reference in a new issue