Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit de7616f

Browse files
committed
add storage_path index on ReportSession
1 parent 4201051 commit de7616f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Generated by Django 4.2.16 on 2025-01-28 15:28
2+
3+
from django.db import migrations, models
4+
5+
"""
6+
BEGIN;
7+
--
8+
-- Create index upload_storage_path_idx on field(s) storage_path of model reportsession
9+
--
10+
CREATE INDEX "upload_storage_path_idx" ON "reports_upload" ("storage_path");
11+
COMMIT;
12+
"""
13+
14+
15+
class Migration(migrations.Migration):
16+
dependencies = [
17+
("reports", "0038_remove_test_reports_test_repoid_name_testsuite_flags_hash"),
18+
]
19+
20+
operations = [
21+
migrations.AddIndex(
22+
model_name="reportsession",
23+
index=models.Index(fields=["storage_path"], name="upload_storage_path_idx"),
24+
),
25+
]

shared/django_apps/reports/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ class Meta:
202202
name="upload_report_type_idx",
203203
fields=["report_id", "upload_type"],
204204
),
205+
models.Index(
206+
name="upload_storage_path_idx",
207+
fields=["storage_path"],
208+
),
205209
]
206210

207211
@property

0 commit comments

Comments
 (0)