From 1689f7ec7b115137c23e1614340533ead78d0d90 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Tue, 28 Nov 2023 20:32:31 -0600 Subject: [PATCH] Add profile index --- judge/migrations/0175_add_profile_index.py | 20 ++++++++++++++++++++ judge/models/profile.py | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 judge/migrations/0175_add_profile_index.py diff --git a/judge/migrations/0175_add_profile_index.py b/judge/migrations/0175_add_profile_index.py new file mode 100644 index 0000000..d9ec296 --- /dev/null +++ b/judge/migrations/0175_add_profile_index.py @@ -0,0 +1,20 @@ +# Generated by Django 3.2.18 on 2023-11-29 02:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("judge", "0174_contest_summary_result"), + ] + + operations = [ + migrations.AddIndex( + model_name="profile", + index=models.Index( + fields=["is_unlisted", "performance_points"], + name="judge_profi_is_unli_d4034c_idx", + ), + ), + ] diff --git a/judge/models/profile.py b/judge/models/profile.py index 6d3b131..b8d3332 100644 --- a/judge/models/profile.py +++ b/judge/models/profile.py @@ -419,6 +419,9 @@ class Profile(models.Model): ) class Meta: + indexes = [ + models.Index(fields=["is_unlisted", "performance_points"]), + ] permissions = ( ("test_site", "Shows in-progress development stuff"), ("totp", "Edit TOTP settings"),