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 3bdea3a commit 1f6aac6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 4.2.16 on 2024-11-15 10:43

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('uni_ticket', '0025_remove_ticketassignment_uni_ticket__taken_b_8d7e69_idx_and_more'),
]

operations = [
migrations.RemoveIndex(
model_name='ticket',
name='uni_ticket__is_clos_8d6d43_idx',
),
migrations.RemoveIndex(
model_name='ticket',
name='uni_ticket__priorit_88a7f4_idx',
),
migrations.RemoveIndex(
model_name='ticket',
name='uni_ticket__priorit_0066dd_idx',
),
migrations.RemoveIndex(
model_name='ticketassignment',
name='uni_ticket__ticket__c50811_idx',
),
]
8 changes: 4 additions & 4 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 Expand Up @@ -1195,7 +1195,7 @@ class Meta:
indexes = [
models.Index(fields=["office", "follow"]),
models.Index(fields=["taken_date"]),
models.Index(fields=["ticket", "office"]),
# models.Index(fields=["ticket", "office"]),
]
# indexes = [models.Index(fields=["office_id", "follow"])]
verbose_name = _("Competenza Ticket")
Expand Down

0 comments on commit 1f6aac6

Please sign in to comment.