legimi fix
[redakcja.git] / src / sources / migrations / 0001_initial.py
1 # Generated by Django 4.1.9 on 2023-09-08 14:03
2
3 from django.db import migrations, models
4 import django.db.models.deletion
5
6
7 class Migration(migrations.Migration):
8
9     initial = True
10
11     dependencies = [
12         ("catalogue", "0050_audience_woblink"),
13     ]
14
15     operations = [
16         migrations.CreateModel(
17             name="Source",
18             fields=[
19                 (
20                     "id",
21                     models.BigAutoField(
22                         auto_created=True,
23                         primary_key=True,
24                         serialize=False,
25                         verbose_name="ID",
26                     ),
27                 ),
28                 ("name", models.CharField(max_length=1024, verbose_name="name")),
29                 ("notes", models.TextField(blank=True, help_text="private")),
30             ],
31         ),
32         migrations.CreateModel(
33             name="BookSource",
34             fields=[
35                 (
36                     "id",
37                     models.BigAutoField(
38                         auto_created=True,
39                         primary_key=True,
40                         serialize=False,
41                         verbose_name="ID",
42                     ),
43                 ),
44                 ("page_start", models.IntegerField(blank=True, null=True)),
45                 ("page_end", models.IntegerField(blank=True, null=True)),
46                 (
47                     "book",
48                     models.ForeignKey(
49                         on_delete=django.db.models.deletion.CASCADE, to="catalogue.book"
50                     ),
51                 ),
52                 (
53                     "source",
54                     models.ForeignKey(
55                         on_delete=django.db.models.deletion.CASCADE, to="sources.source"
56                     ),
57                 ),
58             ],
59             options={
60                 "ordering": ("page_start",),
61             },
62         ),
63     ]