Skip to content

Commit

Permalink
add storage_path index on ReportSession
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-sentry committed Jan 28, 2025
1 parent 4201051 commit de7616f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.16 on 2025-01-28 15:28

from django.db import migrations, models

"""
BEGIN;
--
-- Create index upload_storage_path_idx on field(s) storage_path of model reportsession
--
CREATE INDEX "upload_storage_path_idx" ON "reports_upload" ("storage_path");
COMMIT;
"""


class Migration(migrations.Migration):
dependencies = [
("reports", "0038_remove_test_reports_test_repoid_name_testsuite_flags_hash"),
]

operations = [
migrations.AddIndex(
model_name="reportsession",
index=models.Index(fields=["storage_path"], name="upload_storage_path_idx"),
),
]
4 changes: 4 additions & 0 deletions shared/django_apps/reports/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ class Meta:
name="upload_report_type_idx",
fields=["report_id", "upload_type"],
),
models.Index(
name="upload_storage_path_idx",
fields=["storage_path"],
),
]

@property
Expand Down

0 comments on commit de7616f

Please sign in to comment.