Skip to content

Commit 956a289

Browse files
authored
fix: refactor index_together to indexes for Django 5.2 support (#36693)
1 parent f50565c commit 956a289

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.20 on 2025-05-09 14:28
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('learning_sequences', '0016_through_model_for_user_partition_groups_2'),
10+
]
11+
12+
operations = [
13+
migrations.RenameIndex(
14+
model_name='coursesection',
15+
new_name='course_context_ordering_idx',
16+
old_fields=('course_context', 'ordering'),
17+
),
18+
]

openedx/core/djangoapps/content/learning_sequences/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ class Meta:
228228
unique_together = [
229229
['course_context', 'usage_key'],
230230
]
231-
index_together = [
232-
['course_context', 'ordering'],
231+
indexes = [
232+
models.Index(fields=['course_context', 'ordering'], name='course_context_ordering_idx'),
233233
]
234234

235235

0 commit comments

Comments
 (0)