Skip to content

Commit

Permalink
fix: migrate to Django 5.1 indexes syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Jan 28, 2025
1 parent 759b9a2 commit 694bff4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.1.5 on 2025-01-28 15:16

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('core', '0030_alter_task_template_setting_alter_taskrecord_status_and_more'),
]

operations = [
migrations.RenameIndex(
model_name='taskrecordreview',
new_name='core_taskre_checker_bf3683_idx',
old_fields=('checker_id', 'round'),
),
migrations.RenameIndex(
model_name='taskrecordreview',
new_name='core_taskre_checker_8de86c_idx',
old_fields=('checker_id', 'round', 'status'),
),
]
6 changes: 3 additions & 3 deletions prophecies/core/models/task_record_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ class TaskRecordReview(models.Model):

class Meta:
unique_together = ('task_record_id', 'checker_id', 'round')
index_together = [
('checker_id', 'round'),
('checker_id', 'round', 'status'),
indexes = [
models.Index(fields=["checker_id", "round"]),
models.Index(fields=["checker_id", "round", "status"]),
]
get_latest_by = 'round'

Expand Down

0 comments on commit 694bff4

Please sign in to comment.