# Generated by Django 4.1.7 on 2023-03-16 14:50

from django.db import migrations, models
import django.db.models.deletion
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.fields
import wagtail.images.blocks
import wagtail.snippets.blocks
import wagtail.test.testapp.models


class Migration(migrations.Migration):

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("wagtaildocs", "0012_uploadeddocument"),
        ("wagtailimages", "0025_alter_image_file_alter_rendition_file"),
        ("tests", "0021_remove_non_json_field_streamfields"),
    ]

    operations = [
        migrations.CreateModel(
            name="VariousOnDeleteModel",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("text", models.TextField()),
                ("object_id", models.UUIDField(blank=True, null=True)),
                (
                    "stream_field",
                    wagtail.fields.StreamField(
                        [
                            (
                                "advertisement_content",
                                wagtail.blocks.StreamBlock(
                                    [
                                        (
                                            "captioned_advert",
                                            wagtail.blocks.StructBlock(
                                                [
                                                    (
                                                        "advert",
                                                        wagtail.snippets.blocks.SnippetChooserBlock(
                                                            wagtail.test.testapp.models.Advert
                                                        ),
                                                    ),
                                                    (
                                                        "caption",
                                                        wagtail.blocks.CharBlock(),
                                                    ),
                                                ]
                                            ),
                                        ),
                                        ("rich_text", wagtail.blocks.RichTextBlock()),
                                    ]
                                ),
                            ),
                            ("image", wagtail.images.blocks.ImageChooserBlock()),
                            (
                                "document",
                                wagtail.documents.blocks.DocumentChooserBlock(),
                            ),
                        ],
                        use_json_field=True,
                    ),
                ),
                ("rich_text", wagtail.fields.RichTextField(blank=True)),
                (
                    "content_type",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="contenttypes.contenttype",
                    ),
                ),
                (
                    "on_delete_cascade",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="tests.advert",
                    ),
                ),
                (
                    "on_delete_do_nothing",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.DO_NOTHING,
                        related_name="+",
                        to="tests.advert",
                    ),
                ),
                (
                    "on_delete_protect",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="+",
                        to="tests.advert",
                    ),
                ),
                (
                    "on_delete_restrict",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.RESTRICT,
                        related_name="+",
                        to="tests.advert",
                    ),
                ),
                (
                    "on_delete_set",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=models.SET(
                            wagtail.test.testapp.models.get_default_advert
                        ),
                        related_name="+",
                        to="tests.advert",
                    ),
                ),
                (
                    "on_delete_set_default",
                    models.ForeignKey(
                        blank=True,
                        default=wagtail.test.testapp.models.get_default_advert,
                        null=True,
                        on_delete=django.db.models.deletion.SET_DEFAULT,
                        related_name="+",
                        to="tests.advert",
                    ),
                ),
                (
                    "on_delete_set_null",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="tests.advert",
                    ),
                ),
                (
                    "protected_document",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="+",
                        to="wagtaildocs.document",
                    ),
                ),
                (
                    "protected_image",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="+",
                        to="wagtailimages.image",
                    ),
                ),
            ],
        ),
    ]
