Coverage for apis_core/apis_relations/migrations/0006_versiontemptriple.py: 100%
9 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.11 on 2024-03-27 14:17
3import django.db.models.deletion
4import simple_history.models
5from django.conf import settings
6from django.db import migrations, models
8import apis_core.apis_relations.models
9import apis_core.generic.abc
12class Migration(migrations.Migration):
13 dependencies = [
14 ("apis_metainfo", "0011_alter_rootobject_deprecated_name"),
15 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
16 ("apis_relations", "0005_alter_property_obj_class_alter_property_subj_class"),
17 ]
19 operations = [
20 migrations.CreateModel(
21 name="VersionTempTriple",
22 fields=[
23 (
24 "triple_ptr",
25 models.ForeignKey(
26 auto_created=True,
27 blank=True,
28 db_constraint=False,
29 null=True,
30 on_delete=django.db.models.deletion.DO_NOTHING,
31 parent_link=True,
32 related_name="+",
33 to="apis_relations.triple",
34 ),
35 ),
36 (
37 "id",
38 models.IntegerField(
39 auto_created=True, blank=True, db_index=True, verbose_name="ID"
40 ),
41 ),
42 (
43 "version_tag",
44 models.CharField(blank=True, max_length=255, null=True),
45 ),
46 (
47 "review",
48 models.BooleanField(
49 default=False,
50 help_text="Should be set to True, if the data record holds up quality standards.",
51 ),
52 ),
53 ("start_date", models.DateField(blank=True, null=True)),
54 ("start_start_date", models.DateField(blank=True, null=True)),
55 ("start_end_date", models.DateField(blank=True, null=True)),
56 ("end_date", models.DateField(blank=True, null=True)),
57 ("end_start_date", models.DateField(blank=True, null=True)),
58 ("end_end_date", models.DateField(blank=True, null=True)),
59 (
60 "start_date_written",
61 models.CharField(
62 blank=True, max_length=255, null=True, verbose_name="Start"
63 ),
64 ),
65 (
66 "end_date_written",
67 models.CharField(
68 blank=True, max_length=255, null=True, verbose_name="End"
69 ),
70 ),
71 ("status", models.CharField(max_length=100)),
72 ("references", models.TextField(blank=True, null=True)),
73 ("notes", models.TextField(blank=True, null=True)),
74 ("history_id", models.AutoField(primary_key=True, serialize=False)),
75 ("history_date", models.DateTimeField(db_index=True)),
76 ("history_change_reason", models.CharField(max_length=100, null=True)),
77 (
78 "history_type",
79 models.CharField(
80 choices=[("+", "Created"), ("~", "Changed"), ("-", "Deleted")],
81 max_length=1,
82 ),
83 ),
84 (
85 "history_user",
86 models.ForeignKey(
87 null=True,
88 on_delete=django.db.models.deletion.SET_NULL,
89 related_name="+",
90 to=settings.AUTH_USER_MODEL,
91 ),
92 ),
93 (
94 "obj",
95 apis_core.apis_relations.models.InheritanceForeignKey(
96 blank=True,
97 db_constraint=False,
98 null=True,
99 on_delete=django.db.models.deletion.DO_NOTHING,
100 related_name="+",
101 to="apis_metainfo.rootobject",
102 verbose_name="Object",
103 ),
104 ),
105 (
106 "prop",
107 models.ForeignKey(
108 blank=True,
109 db_constraint=False,
110 null=True,
111 on_delete=django.db.models.deletion.DO_NOTHING,
112 related_name="+",
113 to="apis_relations.property",
114 verbose_name="Property",
115 ),
116 ),
117 (
118 "subj",
119 apis_core.apis_relations.models.InheritanceForeignKey(
120 blank=True,
121 db_constraint=False,
122 null=True,
123 on_delete=django.db.models.deletion.DO_NOTHING,
124 related_name="+",
125 to="apis_metainfo.rootobject",
126 verbose_name="Subject",
127 ),
128 ),
129 ],
130 options={
131 "verbose_name": "Version",
132 "verbose_name_plural": "Versions",
133 "ordering": ("-history_date", "-history_id"),
134 "get_latest_by": ("history_date", "history_id"),
135 },
136 bases=(
137 simple_history.models.HistoricalChanges,
138 models.Model,
139 apis_core.generic.abc.GenericModel,
140 ),
141 ),
142 ]