Skip to content

Commit

Permalink
fix: restore indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Oct 25, 2024
1 parent 01bf8ba commit 0364039
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.9 on 2024-10-25 09:10

from django.db import migrations, models


class Migration(migrations.Migration):

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

operations = [
migrations.RemoveIndex(
model_name='ticket',
name='uni_ticket__priorit_0066dd_idx',
),
migrations.RemoveIndex(
model_name='ticketassignment',
name='uni_ticket__office__54a01d_idx',
),
migrations.AddIndex(
model_name='ticketassignment',
index=models.Index(fields=['office_id', 'follow'], name='uni_ticket__office__f42ab9_idx'),
),
]
3 changes: 1 addition & 2 deletions uniticket/uni_ticket/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ class Meta:
]
verbose_name = _("Ticket")
verbose_name_plural = _("Ticket")
indexes = [models.Index(fields=["priority", "created"])]

@property
def taken_date(self):
Expand Down Expand Up @@ -1187,7 +1186,7 @@ class TicketAssignment(TimeStampedModel):
class Meta:
unique_together = ("ticket", "office")
ordering = ["created"]
indexes = [models.Index(fields=["office_id", "follow", "taken_date"])]
indexes = [models.Index(fields=["office_id", "follow"])]
verbose_name = _("Competenza Ticket")
verbose_name_plural = _("Competenza Ticket")

Expand Down

0 comments on commit 0364039

Please sign in to comment.