Add indexes to drop_campaign_list_view
All checks were successful
Deploy to Server / deploy (push) Successful in 26s
All checks were successful
Deploy to Server / deploy (push) Successful in 26s
This commit is contained in:
parent
1f0109263c
commit
47d4f5341f
4 changed files with 332 additions and 37 deletions
32
twitch/migrations/0019_dropcampaign_campaign_list_indexes.py
Normal file
32
twitch/migrations/0019_dropcampaign_campaign_list_indexes.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# Generated by Django 6.0.4 on 2026-04-10 23:25
|
||||
|
||||
from django.db import migrations
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
"""Add indexes to optimize queries for the campaign list view."""
|
||||
|
||||
dependencies = [
|
||||
(
|
||||
"twitch",
|
||||
"0018_rename_twitch_drop_start_a_929f09_idx_tw_drop_start_desc_idx_and_more",
|
||||
),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddIndex(
|
||||
model_name="dropcampaign",
|
||||
index=models.Index(
|
||||
fields=["is_fully_imported", "-start_at"],
|
||||
name="tw_drop_imported_start_idx",
|
||||
),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="dropcampaign",
|
||||
index=models.Index(
|
||||
fields=["is_fully_imported", "start_at", "end_at"],
|
||||
name="tw_drop_imported_start_end_idx",
|
||||
),
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue