Add submission index
This commit is contained in:
parent
07c3a8859b
commit
545c655e73
2 changed files with 20 additions and 0 deletions
19
judge/migrations/0179_submission_result_lang_index.py
Normal file
19
judge/migrations/0179_submission_result_lang_index.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 3.2.18 on 2024-01-23 00:32
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("judge", "0178_remove_user_script"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddIndex(
|
||||||
|
model_name="submission",
|
||||||
|
index=models.Index(
|
||||||
|
fields=["language", "result"], name="judge_submi_languag_874af4_idx"
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
|
@ -276,6 +276,7 @@ class Submission(models.Model):
|
||||||
indexes = [
|
indexes = [
|
||||||
models.Index(fields=["problem", "user", "-points"]),
|
models.Index(fields=["problem", "user", "-points"]),
|
||||||
models.Index(fields=["contest_object", "problem", "user", "-points"]),
|
models.Index(fields=["contest_object", "problem", "user", "-points"]),
|
||||||
|
models.Index(fields=["language", "result"]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue