# Generated by Django 2.2.17 on 2021-09-02 05:51

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


class Migration(migrations.Migration):

    dependencies = [
        ("wagtailcore", "0062_comment_models_and_pagesubscription"),
        ("torchbox", "0138_auto_20210802_1540"),
    ]

    operations = [
        migrations.AddField(
            model_name="homepage",
            name="hero_image",
            field=models.ForeignKey(
                help_text="Image used on mobile hero.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="+",
                to="torchbox.TorchboxImage",
            ),
        ),
        migrations.CreateModel(
            name="HomePageFeaturedPost",
            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),
                ),
                (
                    "featured_post",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="wagtailcore.Page",
                    ),
                ),
                (
                    "page",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="featured_posts",
                        to="torchbox.HomePage",
                    ),
                ),
            ],
            options={"ordering": ["sort_order"], "abstract": False,},
        ),
    ]
