# Generated by Django 2.2.12 on 2021-01-07 16:51

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


class Migration(migrations.Migration):

    dependencies = [
        ("wagtailcore", "0052_pagelogentry"),
        ("images", "0003_extends_image_fields"),
        ("people", "0011_merge_20200622_1033"),
        ("schools", "0003_improve_relationships_between_models"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="schoolpage",
            name="description",
        ),
        migrations.AddField(
            model_name="schoolpage",
            name="get_in_touch",
            field=wagtail.fields.RichTextField(blank=True),
        ),
        migrations.AddField(
            model_name="schoolpage",
            name="introduction",
            field=wagtail.fields.RichTextField(default=""),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="schoolpage",
            name="location",
            field=wagtail.fields.RichTextField(blank=True),
        ),
        migrations.AddField(
            model_name="schoolpage",
            name="next_open_day_end_date",
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="schoolpage",
            name="next_open_day_start_date",
            field=models.DateField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="schoolpage",
            name="school_dean",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="+",
                to="people.StaffPage",
            ),
        ),
        migrations.AddField(
            model_name="schoolpage",
            name="social_links",
            field=wagtail.fields.StreamField(
                [
                    (
                        "Link",
                        wagtail.blocks.StructBlock(
                            [
                                (
                                    "title",
                                    wagtail.blocks.CharBlock(required=False),
                                ),
                                ("url", wagtail.blocks.URLBlock(required=False)),
                            ]
                        ),
                    )
                ],
                default="",
            ),
            preserve_default=False,
        ),
        migrations.CreateModel(
            name="OpenDayLink",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("link_url", models.URLField(blank=True)),
                ("link_text", models.CharField(blank=True, max_length=255)),
                (
                    "link_page",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="wagtailcore.Page",
                    ),
                ),
                (
                    "source_page",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="open_day_link",
                        to="schools.SchoolPage",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="HeroItem",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "hero_colour_option",
                    models.PositiveSmallIntegerField(
                        choices=[
                            (1, "Light text on dark image"),
                            (2, "dark text on light image"),
                        ]
                    ),
                ),
                (
                    "hero_image",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="images.CustomImage",
                    ),
                ),
                (
                    "page",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="hero_items",
                        to="wagtailcore.Page",
                    ),
                ),
            ],
        ),
    ]
