Compare commits

...

1 Commits

Author SHA1 Message Date
shamoon
13338088cb Performance: add index to paperlesstask task_id 2025-06-19 02:33:58 -07:00
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# Generated by Django 5.1.8 on 2025-06-19 09:33
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
("documents", "1068_alter_document_created"),
]
operations = [
migrations.AlterField(
model_name="paperlesstask",
name="task_id",
field=models.CharField(
db_index=True,
help_text="Celery ID for the Task that was run",
max_length=255,
unique=True,
verbose_name="Task ID",
),
),
]

View File

@@ -545,6 +545,7 @@ class PaperlessTask(ModelWithOwner):
INDEX_OPTIMIZE = ("index_optimize", _("Index Optimize"))
task_id = models.CharField(
db_index=True,
max_length=255,
unique=True,
verbose_name=_("Task ID"),