diff --git a/src/documents/migrations/1063_paperlesstask_type_alter_paperlesstask_task_name_and_more.py b/src/documents/migrations/1063_paperlesstask_type_alter_paperlesstask_task_name_and_more.py index ae4ae0061..a5171d797 100644 --- a/src/documents/migrations/1063_paperlesstask_type_alter_paperlesstask_task_name_and_more.py +++ b/src/documents/migrations/1063_paperlesstask_type_alter_paperlesstask_task_name_and_more.py @@ -4,6 +4,11 @@ from django.db import migrations from django.db import models +def make_existing_tasks_consume_auto(apps, schema_editor): + PaperlessTask = apps.get_model("documents", "PaperlessTask") + PaperlessTask.objects.all().update(type="auto_task", task_name="consume_file") + + class Migration(migrations.Migration): dependencies = [ ("documents", "1062_alter_savedviewfilterrule_rule_type"), @@ -40,6 +45,10 @@ class Migration(migrations.Migration): verbose_name="Task Name", ), ), + migrations.RunPython( + make_existing_tasks_consume_auto, + migrations.RunPython.noop, + ), migrations.AlterField( model_name="workflowactionwebhook", name="url",