# Generated by Django 4.1.9 on 2023-09-08 14:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("catalogue", "0050_audience_woblink"),
    ]

    operations = [
        migrations.CreateModel(
            name="Source",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=1024, verbose_name="name")),
                ("notes", models.TextField(blank=True, help_text="private")),
            ],
        ),
        migrations.CreateModel(
            name="BookSource",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("page_start", models.IntegerField(blank=True, null=True)),
                ("page_end", models.IntegerField(blank=True, null=True)),
                (
                    "book",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="catalogue.book"
                    ),
                ),
                (
                    "source",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="sources.source"
                    ),
                ),
            ],
            options={
                "ordering": ("page_start",),
            },
        ),
    ]
