# Generated by Django 5.2.16 on 2026-07-19 20:33

import django.core.validators
from django.conf import settings
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
    dependencies = [
        ("documents", "0021_widen_workflow_integer_fields"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AlterField(
            model_name="document",
            name="checksum",
            field=models.CharField(
                db_index=True,
                editable=False,
                help_text="The checksum of the original document.",
                max_length=64,
                verbose_name="checksum",
            ),
        ),
        migrations.AlterField(
            model_name="document",
            name="page_count",
            field=models.PositiveIntegerField(
                db_index=True,
                help_text="The number of pages of the document.",
                null=True,
                validators=[django.core.validators.MinValueValidator(1)],
                verbose_name="page count",
            ),
        ),
        migrations.AddIndex(
            model_name="customfieldinstance",
            index=models.Index(
                fields=["field", "value_date"],
                name="documents_c_field_i_30b51d_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="customfieldinstance",
            index=models.Index(
                fields=["field", "value_int"],
                name="documents_c_field_i_d25ab0_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="customfieldinstance",
            index=models.Index(
                fields=["field", "value_float"],
                name="documents_c_field_i_c35174_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="customfieldinstance",
            index=models.Index(
                fields=["field", "value_monetary_amount"],
                name="documents_c_field_i_53ce4e_idx",
            ),
        ),
        migrations.AddIndex(
            model_name="document",
            index=models.Index(
                fields=["owner", "created"],
                name="documents_d_owner_i_ec6ab3_idx",
            ),
        ),
    ]
