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):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("core", "0044_vendor_last_processing_response"),
|
("core", "0044_vendor_last_processing_response"),
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
|
@ -332,27 +331,19 @@ class Migration(migrations.Migration):
|
||||||
),
|
),
|
||||||
migrations.AddIndex(
|
migrations.AddIndex(
|
||||||
model_name="order",
|
model_name="order",
|
||||||
index=models.Index(
|
index=models.Index(fields=["user", "status"], name="core_order_user_id_4407f8_idx"),
|
||||||
fields=["user", "status"], name="core_order_user_id_4407f8_idx"
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
migrations.AddIndex(
|
migrations.AddIndex(
|
||||||
model_name="order",
|
model_name="order",
|
||||||
index=models.Index(
|
index=models.Index(fields=["status", "buy_time"], name="core_order_status_4a088a_idx"),
|
||||||
fields=["status", "buy_time"], name="core_order_status_4a088a_idx"
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
migrations.AddIndex(
|
migrations.AddIndex(
|
||||||
model_name="orderproduct",
|
model_name="orderproduct",
|
||||||
index=models.Index(
|
index=models.Index(fields=["order", "status"], name="core_orderp_order_i_d16192_idx"),
|
||||||
fields=["order", "status"], name="core_orderp_order_i_d16192_idx"
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
migrations.AddIndex(
|
migrations.AddIndex(
|
||||||
model_name="orderproduct",
|
model_name="orderproduct",
|
||||||
index=models.Index(
|
index=models.Index(fields=["product", "status"], name="core_orderp_product_ee8abb_idx"),
|
||||||
fields=["product", "status"], name="core_orderp_product_ee8abb_idx"
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
migrations.AddIndex(
|
migrations.AddIndex(
|
||||||
model_name="product",
|
model_name="product",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue