# Generated by Django 3.0.14 on 2021-09-25 19:18

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


class Migration(migrations.Migration):

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("dbtemplates", "0001_initial"),
        ("bpp", "0293_pbn_api_kasowanie_przed_nie_eksp_zero"),
    ]

    operations = [
        migrations.CreateModel(
            name="SzablonDlaOpisuBibliograficznego",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "model",
                    models.OneToOneField(
                        blank=True,
                        limit_choices_to=models.Q(
                            ("app_label", "bpp"),
                            (
                                "model__in",
                                [
                                    "wydawnictwo_ciagle",
                                    "wydawnictwo_zwarte",
                                    "praca_doktorska",
                                    "praca_habilitacyjna",
                                    "patent",
                                ],
                            ),
                        ),
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="contenttypes.ContentType",
                    ),
                ),
                (
                    "template",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to="dbtemplates.Template",
                    ),
                ),
            ],
        ),
    ]
