fix: refactor index_together to indexes for Django 5.2 support (#36702)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 4.2.20 on 2025-05-12 13:39
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('grades', '0020_alter_historicalpersistentsubsectiongradeoverride_options'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameIndex(
|
||||
model_name='persistentcoursegrade',
|
||||
new_name='passed_timestamp_course_id_idx',
|
||||
old_fields=('passed_timestamp', 'course_id'),
|
||||
),
|
||||
migrations.RenameIndex(
|
||||
model_name='persistentcoursegrade',
|
||||
new_name='modified_course_id_idx',
|
||||
old_fields=('modified', 'course_id'),
|
||||
),
|
||||
]
|
||||
@@ -569,9 +569,9 @@ class PersistentCourseGrade(TimeStampedModel):
|
||||
unique_together = [
|
||||
('course_id', 'user_id'),
|
||||
]
|
||||
index_together = [
|
||||
('passed_timestamp', 'course_id'),
|
||||
('modified', 'course_id')
|
||||
indexes = [
|
||||
models.Index(fields=['passed_timestamp', 'course_id'], name="passed_timestamp_course_id_idx"),
|
||||
models.Index(fields=['modified', 'course_id'], name="modified_course_id_idx")
|
||||
]
|
||||
|
||||
# primary key will need to be large for this table
|
||||
|
||||
Reference in New Issue
Block a user