Skip to content

Commit

Permalink
Add date version index on build (#11612)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Sep 24, 2024
1 parent 31e8371 commit b7835d4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions readthedocs/builds/migrations/0059_add_version_date_index.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.16 on 2024-09-23 18:18

from django.db import migrations, models
from django_safemigrate import Safe


class Migration(migrations.Migration):
safe = Safe.always
dependencies = [
("builds", "0058_alter_version_created_alter_version_modified"),
]

operations = [
migrations.AddIndex(
model_name="build",
index=models.Index(
fields=["version", "date"], name="builds_buil_version_259bbf_idx"
),
),
]
1 change: 1 addition & 0 deletions readthedocs/builds/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,7 @@ class Meta:
]
indexes = [
models.Index(fields=["project", "date"]),
models.Index(fields=["version", "date"]),
]

def __init__(self, *args, **kwargs):
Expand Down

0 comments on commit b7835d4

Please sign in to comment.