# Generated by Django 4.0.7 on 2022-10-10 17:43

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


class Migration(migrations.Migration):

    dependencies = [
        ("wagtailcore", "0015_add_more_verbose_names"),
        ("wagtailsearch", "0003_remove_editors_pick"),
    ]

    operations = [
        migrations.CreateModel(
            name="SearchPromotion",
            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),
                ),
                (
                    "description",
                    models.TextField(blank=True, verbose_name="description"),
                ),
                (
                    "page",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="wagtailcore.page",
                        verbose_name="page",
                    ),
                ),
                (
                    "query",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="editors_picks",
                        to="wagtailsearch.query",
                    ),
                ),
            ],
            options={
                "verbose_name": "Search promotion",
                "ordering": ("sort_order",),
            },
        ),
    ]
