diff --git a/src/accounts/models.py b/src/accounts/models.py index ed1c191..0ca2948 100644 --- a/src/accounts/models.py +++ b/src/accounts/models.py @@ -19,6 +19,9 @@ class Role(models.Model): verbose_name = "Role" verbose_name_plural = "Roles" ordering = ["name"] + indexes = [ + models.Index(fields=["name"]), + ] def __str__(self): return self.name @@ -108,6 +111,9 @@ class SiteBranding(models.Model): db_table = "site_branding" verbose_name = "Site Branding" verbose_name_plural = "Site Branding" + indexes = [ + models.Index(fields=["is_active"]), + ] def __str__(self): return self.brand_name diff --git a/src/notes/models.py b/src/notes/models.py index 403ab94..9d9533f 100644 --- a/src/notes/models.py +++ b/src/notes/models.py @@ -20,7 +20,7 @@ class ProjectNote(models.Model): verbose_name = "Project Note" verbose_name_plural = "Project Notes" indexes = [ - models.Index(fields=["project", "note_date"]), + models.Index(fields=["project", "note_date", "created_at"]), ] def __str__(self):