fix: refactor index_together to indexes for Django 5.2 support
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.20 on 2025-05-15 03:30
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('coursewarehistoryextended', '0002_force_studentmodule_index'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameIndex(
|
||||
model_name='studentmodulehistoryextended',
|
||||
new_name='student_module_idx',
|
||||
old_fields=('student_module',),
|
||||
),
|
||||
]
|
||||
@@ -33,7 +33,12 @@ class StudentModuleHistoryExtended(BaseStudentModuleHistory):
|
||||
class Meta:
|
||||
app_label = 'coursewarehistoryextended'
|
||||
get_latest_by = "created"
|
||||
index_together = ['student_module']
|
||||
indexes = [
|
||||
models.Index(
|
||||
fields=['student_module'],
|
||||
name="student_module_idx"
|
||||
),
|
||||
]
|
||||
|
||||
id = UnsignedBigIntAutoField(primary_key=True) # pylint: disable=invalid-name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user