# Generated by Django 5.1.4 on 2025-01-12 14:27

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("core", "0016_add_document_excerpt"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="document",
            options={
                "ordering": ("path",),
                "verbose_name": "Document",
                "verbose_name_plural": "Documents",
            },
        ),
        migrations.AddField(
            model_name="document",
            name="ancestors_deleted_at",
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="document",
            name="deleted_at",
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name="user",
            name="language",
            field=models.CharField(
                choices="(('en-us', 'English'), ('fr-fr', 'French'), ('de-de', 'German'))",
                default="en-us",
                help_text="The language in which the user wants to see the interface.",
                max_length=10,
                verbose_name="language",
            ),
        ),
        migrations.AddConstraint(
            model_name="document",
            constraint=models.CheckConstraint(
                condition=models.Q(
                    ("deleted_at__isnull", True),
                    ("deleted_at", models.F("ancestors_deleted_at")),
                    _connector="OR",
                ),
                name="check_deleted_at_matches_ancestors_deleted_at_when_set",
            ),
        ),
    ]
