# Generated by Django 2.2.4 on 2019-08-22 11:49

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


class Migration(migrations.Migration):

    dependencies = [
        ("images", "0002_customimage_file_hash"),
        ("programmes", "0008_add_apply_fields"),
    ]

    operations = [
        migrations.AddField(
            model_name="programmepage",
            name="staff_link",
            field=models.URLField(blank=True),
        ),
        migrations.AddField(
            model_name="programmepage",
            name="staff_link_text",
            field=models.CharField(
                blank=True, help_text="E.g. 'See all programme staff'", max_length=125
            ),
        ),
        migrations.CreateModel(
            name="ProgramPageRelatedStaff",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "sort_order",
                    models.IntegerField(blank=True, editable=False, null=True),
                ),
                ("name", models.CharField(max_length=125)),
                ("role", models.CharField(blank=True, max_length=125)),
                ("description", models.TextField(blank=True)),
                ("link", models.URLField(blank=True)),
                ("link_text", models.CharField(blank=True, max_length=125)),
                (
                    "image",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="images.CustomImage",
                    ),
                ),
                (
                    "source_page",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="related_staff",
                        to="programmes.ProgrammePage",
                    ),
                ),
            ],
            options={"ordering": ["sort_order"], "abstract": False},
        ),
    ]
