Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

3.1 KB
Raw Blame
# Generated by Django 5.2.16 on 2026-08-10 18:26

from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
    dependencies = [
        ("documents", "0024_alter_workflowaction_type"),
    ]

    operations = [
        migrations.AddField(
            model_name="workflowaction",
            name="ai_create_missing",
            field=models.BooleanField(
                default=False,
                help_text="Create suggested tags, correspondents, document types and storage paths that do not already exist instead of skipping them.",
                verbose_name="create missing objects",
            ),
        ),
        migrations.AddField(
            model_name="workflowaction",
            name="ai_overwrite_existing",
            field=models.BooleanField(
                default=False,
                help_text="Apply suggestions even if the document already has a value for that field. Tags are always added to, never replaced.",
                verbose_name="overwrite existing values",
            ),
        ),
        migrations.AddField(
            model_name="workflowaction",
            name="ai_suggestion_fields",
            field=models.JSONField(
                blank=True,
                help_text="Which of the AI-suggested fields to apply to the document.",
                null=True,
                verbose_name="AI suggestion fields",
            ),
        ),
        migrations.AlterField(
            model_name="workflowaction",
            name="type",
            field=models.PositiveSmallIntegerField(
                choices=[
                    (1, "Assignment"),
                    (2, "Removal"),
                    (3, "Email"),
                    (4, "Webhook"),
                    (5, "Password removal"),
                    (6, "Move to trash"),
                    (7, "Remote OCR"),
                    (8, "Apply AI suggestions"),
                ],
                default=1,
                verbose_name="Workflow Action Type",
            ),
        ),
        migrations.AlterField(
            model_name="paperlesstask",
            name="task_type",
            field=models.CharField(
                choices=[
                    ("consume_file", "Consume File"),
                    ("train_classifier", "Train Classifier"),
                    ("sanity_check", "Sanity Check"),
                    ("index_optimize", "Index Optimize"),
                    ("mail_fetch", "Mail Fetch"),
                    ("llm_index", "LLM Index"),
                    ("empty_trash", "Empty Trash"),
                    ("check_workflows", "Check Workflows"),
                    ("bulk_update", "Bulk Update"),
                    ("reprocess_document", "Reprocess Document"),
                    ("build_share_link", "Build Share Link"),
                    ("bulk_delete", "Bulk Delete"),
                    ("apply_ai_suggestions", "Apply AI Suggestions"),
                ],
                db_index=True,
                help_text="The kind of work being performed",
                max_length=50,
                verbose_name="Task Type",
            ),
        ),
    ]