From b346b1bf94706154f9098219bb95edb2801497e8 Mon Sep 17 00:00:00 2001 From: AngryUbuntuNerd Date: Tue, 5 Nov 2024 13:19:26 +0000 Subject: [PATCH] add index to periodic_task_name --- ...skresult_django_cele_periodi_1993cf_idx.py | 20 +++++++++++++++++++ django_celery_results/models.py | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 django_celery_results/migrations/0013_taskresult_django_cele_periodi_1993cf_idx.py diff --git a/django_celery_results/migrations/0013_taskresult_django_cele_periodi_1993cf_idx.py b/django_celery_results/migrations/0013_taskresult_django_cele_periodi_1993cf_idx.py new file mode 100644 index 0000000..9b1374b --- /dev/null +++ b/django_celery_results/migrations/0013_taskresult_django_cele_periodi_1993cf_idx.py @@ -0,0 +1,20 @@ +# Generated by Django 5.1.3 on 2024-11-05 13:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_celery_results', '0012_taskresult_date_started'), + ] + + operations = [ + migrations.AddIndex( + model_name='taskresult', + index=models.Index( + fields=['periodic_task_name'], + name='django_cele_periodi_1993cf_idx' + ), + ), + ] diff --git a/django_celery_results/models.py b/django_celery_results/models.py index db8986e..d2f34d5 100644 --- a/django_celery_results/models.py +++ b/django_celery_results/models.py @@ -115,6 +115,8 @@ class Meta: name='django_cele_date_cr_f04a50_idx'), models.Index(fields=['date_done'], name='django_cele_date_do_f59aad_idx'), + models.Index(fields=['periodic_task_name'], + name='django_cele_periodi_1993cf_idx'), ] def as_dict(self):