# Generated by Django 3.2.7 on 2022-04-10 17:23

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


class Migration(migrations.Migration):

    dependencies = [
        ("topics", "0009_topicmaterial"),
    ]

    operations = [
        migrations.CreateModel(
            name="TopicRelation",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "relation_type",
                    models.CharField(
                        choices=[
                            ("IsCitedBy", "is cited by"),
                            ("Cites", "cites"),
                            ("IsSupplementTo", "is supplement to"),
                            ("IsSupplementedBy", "is supplemented by"),
                            ("IsContinuedBy", "is continued by"),
                            ("Continues", "continues"),
                            ("IsDescribedBy", "is described by"),
                            ("Describes", "describes"),
                            ("HasMetadata", "has metadata"),
                            ("IsMetadataFor", "is metadata for"),
                            ("HasVersion", "has version"),
                            ("IsVersionOf", "is version of"),
                            ("IsNewVersionOf", "is new version of"),
                            ("PreviousVersionOf", "previous version of"),
                            ("IsPartOf", "is part of"),
                            ("HasPart", "has part"),
                            ("IsReferencedBy", "is referenced by"),
                            ("References", "references"),
                            ("IsDocumentedBy", "is documented by"),
                            ("Documents", "documents"),
                            ("IsCompiledBy", "is compiled by"),
                            ("Compiles", "compiles"),
                            ("IsVariantFormOf", "is variant form of"),
                            ("IsOriginalFormOf", "is original form of"),
                            ("IsIdenticalTo", "is identical to"),
                            ("IsReviewedBy", "is reviewed by"),
                            ("Reviews", "reviews"),
                            ("IsDerivedFrom", "is derived from"),
                            ("IsSourceOf", "is source of"),
                            ("Requires", "requires"),
                            ("IsRequiredBy", "is required by"),
                            ("IsObsoletedBy", "is obsoleted by"),
                            ("Obsoletes", "obsoletes"),
                        ],
                        help_text="The description of the relation between the two topics.",
                        max_length=30,
                    ),
                ),
                (
                    "left",
                    models.ForeignKey(
                        help_text="The left side of the relation",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="relation_left",
                        to="topics.topic",
                    ),
                ),
                (
                    "right",
                    models.ForeignKey(
                        help_text="The left side of the relation",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="relation_right",
                        to="topics.topic",
                    ),
                ),
            ],
        ),
    ]
