# Generated by Django 4.1 on 2023-04-07 18:01

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
    dependencies = [
        ("torque", "0046_delete_templatecachedocument"),
    ]

    operations = [
        migrations.CreateModel(
            name="TemplateCacheDocument",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("rendered_text", models.TextField(null=True)),
                ("dirty", models.BooleanField(default=False)),
                (
                    "document_dict",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="torque.documentdictcache",
                    ),
                ),
                (
                    "template",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="torque.template",
                    ),
                ),
            ],
        ),
        migrations.AddConstraint(
            model_name="templatecachedocument",
            constraint=models.UniqueConstraint(
                fields=("document_dict", "template"),
                name="unique_template_cache_document",
            ),
        ),
    ]
