Debian Codegraph @

example/pexp/migrations/0001_initial.py

raw
1 from django.db import migrations, models
2
3 import polymorphic.showfields
4
5
6 class Migration(migrations.Migration):
7
8 dependencies = [("contenttypes", "0002_remove_content_type_name")]
9
10 operations = [
11 migrations.CreateModel(
12 name="NormalModelA",
13 fields=[
14 (
15 "id",
16 models.AutoField(
17 verbose_name="ID",
18 serialize=False,
19 auto_created=True,
20 primary_key=True,
21 ),
22 ),
23 ("field1", models.CharField(max_length=10)),
24 ],
25 ),
26 migrations.CreateModel(
27 name="Project",
28 fields=[
29 (
30 "id",
31 models.AutoField(
32 verbose_name="ID",
33 serialize=False,
34 auto_created=True,
35 primary_key=True,
36 ),
37 ),
38 ("topic", models.CharField(max_length=30)),
39 ],
40 options={"abstract": False},
41 bases=(polymorphic.showfields.ShowFieldContent, models.Model),
42 ),
43 migrations.CreateModel(
44 name="ProxyBase",
45 fields=[
46 (
47 "id",
48 models.AutoField(
49 verbose_name="ID",
50 serialize=False,
51 auto_created=True,
52 primary_key=True,
53 ),
54 ),
55 ("title", models.CharField(max_length=200)),
56 (
57 "polymorphic_ctype",
58 models.ForeignKey(
59 related_name="polymorphic_pexp.proxybase_set+",
60 editable=False,
61 on_delete=models.CASCADE,
62 to="contenttypes.ContentType",
63 null=True,
64 ),
65 ),
66 ],
67 options={"ordering": ("title",)},
68 ),
69 migrations.CreateModel(
70 name="TestModelA",
71 fields=[
72 (
73 "id",
74 models.AutoField(
75 verbose_name="ID",
76 serialize=False,
77 auto_created=True,
78 primary_key=True,
79 ),
80 ),
81 ("field1", models.CharField(max_length=10)),
82 ],
83 options={"abstract": False},
84 bases=(polymorphic.showfields.ShowFieldTypeAndContent, models.Model),
85 ),
86 migrations.CreateModel(
87 name="UUIDModelA",
88 fields=[
89 (
90 "uuid_primary_key",
91 models.UUIDField(serialize=False, primary_key=True),
92 ),
93 ("field1", models.CharField(max_length=10)),
94 ],
95 options={"abstract": False},
96 bases=(polymorphic.showfields.ShowFieldTypeAndContent, models.Model),
97 ),
98 migrations.CreateModel(
99 name="ArtProject",
100 fields=[
101 (
102 "project_ptr",
103 models.OneToOneField(
104 parent_link=True,
105 auto_created=True,
106 primary_key=True,
107 serialize=False,
108 on_delete=models.CASCADE,
109 to="pexp.Project",
110 ),
111 ),
112 ("artist", models.CharField(max_length=30)),
113 ],
114 options={"abstract": False},
115 bases=("pexp.project",),
116 ),
117 migrations.CreateModel(
118 name="NormalModelB",
119 fields=[
120 (
121 "normalmodela_ptr",
122 models.OneToOneField(
123 parent_link=True,
124 auto_created=True,
125 primary_key=True,
126 serialize=False,
127 on_delete=models.CASCADE,
128 to="pexp.NormalModelA",
129 ),
130 ),
131 ("field2", models.CharField(max_length=10)),
132 ],
133 bases=("pexp.normalmodela",),
134 ),
135 migrations.CreateModel(
136 name="ResearchProject",
137 fields=[
138 (
139 "project_ptr",
140 models.OneToOneField(
141 parent_link=True,
142 auto_created=True,
143 primary_key=True,
144 serialize=False,
145 on_delete=models.CASCADE,
146 to="pexp.Project",
147 ),
148 ),
149 ("supervisor", models.CharField(max_length=30)),
150 ],
151 options={"abstract": False},
152 bases=("pexp.project",),
153 ),
154 migrations.CreateModel(
155 name="TestModelB",
156 fields=[
157 (
158 "testmodela_ptr",
159 models.OneToOneField(
160 parent_link=True,
161 auto_created=True,
162 primary_key=True,
163 serialize=False,
164 on_delete=models.CASCADE,
165 to="pexp.TestModelA",
166 ),
167 ),
168 ("field2", models.CharField(max_length=10)),
169 ],
170 options={"abstract": False},
171 bases=("pexp.testmodela",),
172 ),
173 migrations.CreateModel(
174 name="UUIDModelB",
175 fields=[
176 (
177 "uuidmodela_ptr",
178 models.OneToOneField(
179 parent_link=True,
180 auto_created=True,
181 primary_key=True,
182 serialize=False,
183 on_delete=models.CASCADE,
184 to="pexp.UUIDModelA",
185 ),
186 ),
187 ("field2", models.CharField(max_length=10)),
188 ],
189 options={"abstract": False},
190 bases=("pexp.uuidmodela",),
191 ),
192 migrations.AddField(
193 model_name="uuidmodela",
194 name="polymorphic_ctype",
195 field=models.ForeignKey(
196 related_name="polymorphic_pexp.uuidmodela_set+",
197 editable=False,
198 on_delete=models.CASCADE,
199 to="contenttypes.ContentType",
200 null=True,
201 ),
202 ),
203 migrations.AddField(
204 model_name="testmodela",
205 name="polymorphic_ctype",
206 field=models.ForeignKey(
207 related_name="polymorphic_pexp.testmodela_set+",
208 editable=False,
209 on_delete=models.CASCADE,
210 to="contenttypes.ContentType",
211 null=True,
212 ),
213 ),
214 migrations.AddField(
215 model_name="project",
216 name="polymorphic_ctype",
217 field=models.ForeignKey(
218 related_name="polymorphic_pexp.project_set+",
219 editable=False,
220 on_delete=models.CASCADE,
221 to="contenttypes.ContentType",
222 null=True,
223 ),
224 ),
225 migrations.CreateModel(
226 name="ProxyA", fields=[], options={"proxy": True}, bases=("pexp.proxybase",)
227 ),
228 migrations.CreateModel(
229 name="ProxyB", fields=[], options={"proxy": True}, bases=("pexp.proxybase",)
230 ),
231 migrations.CreateModel(
232 name="NormalModelC",
233 fields=[
234 (
235 "normalmodelb_ptr",
236 models.OneToOneField(
237 parent_link=True,
238 auto_created=True,
239 primary_key=True,
240 serialize=False,
241 on_delete=models.CASCADE,
242 to="pexp.NormalModelB",
243 ),
244 ),
245 ("field3", models.CharField(max_length=10)),
246 ],
247 bases=("pexp.normalmodelb",),
248 ),
249 migrations.CreateModel(
250 name="TestModelC",
251 fields=[
252 (
253 "testmodelb_ptr",
254 models.OneToOneField(
255 parent_link=True,
256 auto_created=True,
257 primary_key=True,
258 serialize=False,
259 on_delete=models.CASCADE,
260 to="pexp.TestModelB",
261 ),
262 ),
263 ("field3", models.CharField(max_length=10)),
264 (
265 "field4",
266 models.ManyToManyField(related_name="related_c", to="pexp.TestModelB"),
267 ),
268 ],
269 options={"abstract": False},
270 bases=("pexp.testmodelb",),
271 ),
272 migrations.CreateModel(
273 name="UUIDModelC",
274 fields=[
275 (
276 "uuidmodelb_ptr",
277 models.OneToOneField(
278 parent_link=True,
279 auto_created=True,
280 primary_key=True,
281 serialize=False,
282 on_delete=models.CASCADE,
283 to="pexp.UUIDModelB",
284 ),
285 ),
286 ("field3", models.CharField(max_length=10)),
287 ],
288 options={"abstract": False},
289 bases=("pexp.uuidmodelb",),
290 ),
291 ]