Skip to content

Commit b346b1b

Browse files
AngryUbuntuNerdauvipy
authored andcommitted
add index to periodic_task_name
1 parent d704c30 commit b346b1b

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Generated by Django 5.1.3 on 2024-11-05 13:17
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('django_celery_results', '0012_taskresult_date_started'),
10+
]
11+
12+
operations = [
13+
migrations.AddIndex(
14+
model_name='taskresult',
15+
index=models.Index(
16+
fields=['periodic_task_name'],
17+
name='django_cele_periodi_1993cf_idx'
18+
),
19+
),
20+
]

django_celery_results/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ class Meta:
115115
name='django_cele_date_cr_f04a50_idx'),
116116
models.Index(fields=['date_done'],
117117
name='django_cele_date_do_f59aad_idx'),
118+
models.Index(fields=['periodic_task_name'],
119+
name='django_cele_periodi_1993cf_idx'),
118120
]
119121

120122
def as_dict(self):

0 commit comments

Comments
 (0)