# Generated by Django 4.2.24 on 2026-01-11

from django.db import migrations, models


class Migration(migrations.Migration):
    """
    Increase content_hash field length from 64 to 128 characters.

    This is needed because the duplicate() method and 0055_isolate_structural_sets
    migration create content hashes in the format: {sha256_hash}_{corpus_id}

    SHA-256 hashes are 64 characters, and corpus IDs can be up to 20 digits
    (BigInt max), plus underscore separator = 85 chars max. Using 128 for safety.
    """

    dependencies = [
        ("annotations", "0055_isolate_structural_sets"),
    ]

    operations = [
        migrations.AlterField(
            model_name="structuralannotationset",
            name="content_hash",
            field=models.CharField(
                db_index=True,
                help_text="SHA-256 hash of the document content this set belongs to",
                max_length=128,
                unique=True,
            ),
        ),
    ]
