# Generated by Django 4.0.7 on 2022-09-06 14:26

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


class Migration(migrations.Migration):

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("wagtailcore", "0077_alter_revision_user"),
    ]

    operations = [
        migrations.CreateModel(
            name="ReferenceIndex",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "object_id",
                    models.CharField(max_length=255, verbose_name="object id"),
                ),
                (
                    "to_object_id",
                    models.CharField(max_length=255, verbose_name="object id"),
                ),
                ("model_path", models.TextField()),
                ("content_path", models.TextField()),
                ("content_path_hash", models.UUIDField()),
                (
                    "base_content_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="contenttypes.contenttype",
                    ),
                ),
                (
                    "content_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="contenttypes.contenttype",
                    ),
                ),
                (
                    "to_content_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="contenttypes.contenttype",
                    ),
                ),
            ],
            options={
                "unique_together": {
                    (
                        "base_content_type",
                        "object_id",
                        "to_content_type",
                        "to_object_id",
                        "content_path_hash",
                    )
                },
            },
        ),
    ]
