# Generated by Django 2.2.20 on 2021-05-06 22:47

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


class Migration(migrations.Migration):

    dependencies = [
        ("course_flow", "0057_auto_20210505_1753"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="outcome",
            name="horizontal_outcome_links",
        ),
        migrations.CreateModel(
            name="OutcomeHorizontalLink",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("added_on", models.DateTimeField(auto_now_add=True)),
                ("rank", models.PositiveIntegerField(default=0)),
                (
                    "outcome",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="horizontal_outcome_links",
                        to="course_flow.Outcome",
                    ),
                ),
                (
                    "parent_outcome",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="reverse_horizontal_outcome_links",
                        to="course_flow.Outcome",
                    ),
                ),
            ],
            options={
                "verbose_name": "Outcome-Outcome Link",
                "verbose_name_plural": "Outcome-Outcome Links",
            },
        ),
        migrations.AddField(
            model_name="outcome",
            name="horizontal_outcomes",
            field=models.ManyToManyField(
                blank=True,
                related_name="reverse_horizontal_outcomes",
                through="course_flow.OutcomeHorizontalLink",
                to="course_flow.Outcome",
            ),
        ),
    ]
