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 12, 2024
1 parent 1fac126 commit adcdb22
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 4.2.16 on 2024-11-12 08:42

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('uni_ticket', '0022_alter_ticket_is_closed'),
]

operations = [
migrations.RemoveIndex(
model_name='ticketassignment',
name='uni_ticket__office__f42ab9_idx',
),
migrations.AddIndex(
model_name='ticketassignment',
index=models.Index(fields=['ticket_id', 'office_id', 'follow'], name='uni_ticket__ticket__c4313e_idx'),
),
]
2 changes: 1 addition & 1 deletion uniticket/uni_ticket/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ class TicketAssignment(TimeStampedModel):
class Meta:
unique_together = ("ticket", "office")
ordering = ["created"]
indexes = [models.Index(fields=["office_id", "follow"])]
indexes = [models.Index(fields=["ticket_id", "office_id", "follow"])]
verbose_name = _("Competenza Ticket")
verbose_name_plural = _("Competenza Ticket")

Expand Down

0 comments on commit adcdb22

Please sign in to comment.