Skip to content

Commit

Permalink
fix: db indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Nov 15, 2024
1 parent 1f6aac6 commit bac4b7f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.16 on 2024-11-15 14:31

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('uni_ticket', '0026_remove_ticket_uni_ticket__is_clos_8d6d43_idx_and_more'),
]

operations = [
migrations.AddIndex(
model_name='ticket',
index=models.Index(fields=['is_closed'], name='uni_ticket__is_clos_8d6d43_idx'),
),
migrations.AddIndex(
model_name='ticket',
index=models.Index(fields=['priority'], name='uni_ticket__priorit_88a7f4_idx'),
),
migrations.AddIndex(
model_name='ticket',
index=models.Index(fields=['priority', 'created'], name='uni_ticket__priorit_0066dd_idx'),
),
]
6 changes: 3 additions & 3 deletions uniticket/uni_ticket/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,10 @@ class Meta:
verbose_name = _("Ticket")
verbose_name_plural = _("Ticket")
indexes = [
# models.Index(fields=["is_closed"]),
# models.Index(fields=["priority"]),
models.Index(fields=["is_closed"]),
models.Index(fields=["priority"]),
models.Index(fields=["created"]),
# models.Index(fields=["priority", "created"]),
models.Index(fields=["priority", "created"]),
]

@property
Expand Down

0 comments on commit bac4b7f

Please sign in to comment.