show isbn for woblink
[redakcja.git] / src / depot / migrations / 0009_sitebook_sitebookpublish_site_book.py
1 # Generated by Django 4.1.9 on 2023-09-05 14:13
2
3 from django.db import migrations, models
4 import django.db.models.deletion
5
6
7 class Migration(migrations.Migration):
8
9     dependencies = [
10         ("documents", "0011_book_woblink_id"),
11         ("depot", "0008_rename_shop_site"),
12     ]
13
14     operations = [
15         migrations.CreateModel(
16             name="SiteBook",
17             fields=[
18                 (
19                     "id",
20                     models.AutoField(
21                         auto_created=True,
22                         primary_key=True,
23                         serialize=False,
24                         verbose_name="ID",
25                     ),
26                 ),
27                 ("external_id", models.CharField(blank=True, max_length=255)),
28                 ("created_at", models.DateTimeField(auto_now_add=True)),
29                 (
30                     "book",
31                     models.ForeignKey(
32                         on_delete=django.db.models.deletion.CASCADE, to="documents.book"
33                     ),
34                 ),
35                 (
36                     "site",
37                     models.ForeignKey(
38                         null=True,
39                         on_delete=django.db.models.deletion.SET_NULL,
40                         to="depot.site",
41                     ),
42                 ),
43             ],
44             options={
45                 "unique_together": {("book", "site")},
46             },
47         ),
48         migrations.AddField(
49             model_name="sitebookpublish",
50             name="site_book",
51             field=models.ForeignKey(
52                 blank=True,
53                 null=True,
54                 on_delete=django.db.models.deletion.PROTECT,
55                 to="depot.sitebook",
56             ),
57         ),
58     ]