Make GameDetailView faster
This commit is contained in:
parent
4714894247
commit
16b12a7035
4 changed files with 157 additions and 109 deletions
|
|
@ -0,0 +1,22 @@
|
|||
# Generated by Django 6.0.4 on 2026-04-12 03:06
|
||||
|
||||
from django.db import migrations
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
"Add an index on the DropCampaign model for the game and end_at fields, with end_at in descending order. This is to optimize queries that filter by game and order by end_at descending."
|
||||
|
||||
dependencies = [
|
||||
("twitch", "0021_channel_allowed_campaign_count_cache"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddIndex(
|
||||
model_name="dropcampaign",
|
||||
index=models.Index(
|
||||
fields=["game", "-end_at"],
|
||||
name="tw_drop_game_end_desc_idx",
|
||||
),
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue