diff --git a/caluma/caluma_workflow/migrations/0034_workitem_caluma_work_created_c87fd3_idx_and_more.py b/caluma/caluma_workflow/migrations/0034_workitem_caluma_work_created_c87fd3_idx_and_more.py new file mode 100644 index 000000000..caf6e36c2 --- /dev/null +++ b/caluma/caluma_workflow/migrations/0034_workitem_caluma_work_created_c87fd3_idx_and_more.py @@ -0,0 +1,21 @@ +# Generated by Django 4.2.15 on 2024-12-02 13:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('caluma_workflow', '0033_workitem_indexes'), + ] + + operations = [ + migrations.AddIndex( + model_name='workitem', + index=models.Index(fields=['created_at'], name='caluma_work_created_c87fd3_idx'), + ), + migrations.AddIndex( + model_name='workitem', + index=models.Index(fields=['deadline'], name='caluma_work_deadlin_3d2f3c_idx'), + ), + ] diff --git a/caluma/caluma_workflow/models.py b/caluma/caluma_workflow/models.py index 4942f5d5a..8e691d05d 100644 --- a/caluma/caluma_workflow/models.py +++ b/caluma/caluma_workflow/models.py @@ -300,6 +300,8 @@ class Meta: GinIndex(fields=["controlling_groups"]), GinIndex(fields=["assigned_users"]), GinIndex(fields=["meta"]), + models.Index(fields=["created_at"]), + models.Index(fields=["deadline"]), ]