Coverage for apis_core/apis_relations/migrations/0001_initial.py: 100%
7 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 3.1.14 on 2022-02-01 12:41
3import django.db.models.deletion
4from django.db import migrations, models
6import apis_core.apis_relations.models
9class Migration(migrations.Migration):
10 initial = True
12 dependencies = [
13 ("apis_metainfo", "0002_auto_20220201_1241"),
14 ("contenttypes", "0002_remove_content_type_name"),
15 ]
17 operations = [
18 migrations.CreateModel(
19 name="Property",
20 fields=[
21 (
22 "rootobject_ptr",
23 models.OneToOneField(
24 auto_created=True,
25 on_delete=django.db.models.deletion.CASCADE,
26 parent_link=True,
27 primary_key=True,
28 serialize=False,
29 to="apis_metainfo.rootobject",
30 ),
31 ),
32 (
33 "name_forward",
34 models.CharField(
35 blank=True,
36 help_text='Inverse relation like: "is sub-class of" vs. "is super-class of".',
37 max_length=255,
38 verbose_name="Name reverse",
39 ),
40 ),
41 (
42 "name_reverse",
43 models.CharField(
44 blank=True,
45 help_text='Inverse relation like: "is sub-class of" vs. "is super-class of".',
46 max_length=255,
47 verbose_name="Name reverse",
48 ),
49 ),
50 (
51 "obj_class",
52 models.ManyToManyField(
53 limit_choices_to=models.Q(app_label="apis_entities"),
54 related_name="property_set_obj",
55 to="contenttypes.ContentType",
56 ),
57 ),
58 (
59 "subj_class",
60 models.ManyToManyField(
61 limit_choices_to=models.Q(app_label="apis_entities"),
62 related_name="property_set_subj",
63 to="contenttypes.ContentType",
64 ),
65 ),
66 ],
67 bases=("apis_metainfo.rootobject",),
68 ),
69 migrations.CreateModel(
70 name="Triple",
71 fields=[
72 (
73 "id",
74 models.AutoField(
75 auto_created=True,
76 primary_key=True,
77 serialize=False,
78 verbose_name="ID",
79 ),
80 ),
81 (
82 "obj",
83 apis_core.apis_relations.models.InheritanceForeignKey(
84 blank=True,
85 null=True,
86 on_delete=django.db.models.deletion.CASCADE,
87 related_name="triple_set_from_obj",
88 to="apis_metainfo.rootobject",
89 ),
90 ),
91 (
92 "prop",
93 models.ForeignKey(
94 blank=True,
95 null=True,
96 on_delete=django.db.models.deletion.CASCADE,
97 related_name="triple_set_from_prop",
98 to="apis_relations.property",
99 ),
100 ),
101 (
102 "subj",
103 apis_core.apis_relations.models.InheritanceForeignKey(
104 blank=True,
105 null=True,
106 on_delete=django.db.models.deletion.CASCADE,
107 related_name="triple_set_from_subj",
108 to="apis_metainfo.rootobject",
109 ),
110 ),
111 ],
112 ),
113 migrations.CreateModel(
114 name="TempTriple",
115 fields=[
116 (
117 "triple_ptr",
118 models.OneToOneField(
119 auto_created=True,
120 on_delete=django.db.models.deletion.CASCADE,
121 parent_link=True,
122 primary_key=True,
123 serialize=False,
124 to="apis_relations.triple",
125 ),
126 ),
127 (
128 "review",
129 models.BooleanField(
130 default=False,
131 help_text="Should be set to True, if the data record holds up quality standards.",
132 ),
133 ),
134 ("start_date", models.DateField(blank=True, null=True)),
135 ("start_start_date", models.DateField(blank=True, null=True)),
136 ("start_end_date", models.DateField(blank=True, null=True)),
137 ("end_date", models.DateField(blank=True, null=True)),
138 ("end_start_date", models.DateField(blank=True, null=True)),
139 ("end_end_date", models.DateField(blank=True, null=True)),
140 (
141 "start_date_written",
142 models.CharField(
143 blank=True, max_length=255, null=True, verbose_name="Start"
144 ),
145 ),
146 (
147 "end_date_written",
148 models.CharField(
149 blank=True, max_length=255, null=True, verbose_name="End"
150 ),
151 ),
152 ("status", models.CharField(max_length=100)),
153 ("references", models.TextField(blank=True, null=True)),
154 ("notes", models.TextField(blank=True, null=True)),
155 ],
156 bases=("apis_relations.triple",),
157 ),
158 ]