Coverage for apis_core/collections/migrations/0001_initial.py: 100%
6 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-22 07:51 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-22 07:51 +0000
1# Generated by Django 4.2.8 on 2024-01-23 08:41
3import django.db.models.deletion
4from django.db import migrations, models
7class Migration(migrations.Migration):
8 initial = True
10 dependencies = [
11 ("contenttypes", "0002_remove_content_type_name"),
12 ]
14 operations = [
15 migrations.CreateModel(
16 name="SkosCollection",
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 (
28 "name",
29 models.CharField(
30 help_text="Collection label or name",
31 max_length=300,
32 verbose_name="skos:prefLabel",
33 ),
34 ),
35 (
36 "label_lang",
37 models.CharField(
38 blank=True,
39 default="en",
40 help_text="Language of preferred label given above",
41 max_length=3,
42 verbose_name="skos:prefLabel language",
43 ),
44 ),
45 (
46 "creator",
47 models.TextField(
48 blank=True,
49 help_text="Person or organisation that created this collectionIf more than one list all using a semicolon ;",
50 verbose_name="dc:creator",
51 ),
52 ),
53 (
54 "contributor",
55 models.TextField(
56 blank=True,
57 help_text="Person or organisation that made contributions to the collectionIf more than one list all using a semicolon ;",
58 verbose_name="dc:contributor",
59 ),
60 ),
61 (
62 "parent",
63 models.ForeignKey(
64 blank=True,
65 null=True,
66 on_delete=django.db.models.deletion.CASCADE,
67 to="collections.skoscollection",
68 ),
69 ),
70 ],
71 ),
72 migrations.CreateModel(
73 name="SkosCollectionContentObject",
74 fields=[
75 (
76 "id",
77 models.AutoField(
78 auto_created=True,
79 primary_key=True,
80 serialize=False,
81 verbose_name="ID",
82 ),
83 ),
84 ("object_id", models.PositiveIntegerField()),
85 (
86 "collection",
87 models.ForeignKey(
88 on_delete=django.db.models.deletion.CASCADE,
89 to="collections.skoscollection",
90 ),
91 ),
92 (
93 "content_type",
94 models.ForeignKey(
95 on_delete=django.db.models.deletion.CASCADE,
96 to="contenttypes.contenttype",
97 ),
98 ),
99 ],
100 ),
101 ]