Coverage for sample_project/migrations/0001_initial.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.8, created at 2024-12-20 09:24 +0000

1# Generated by Django 5.0.4 on 2024-05-14 08:14 

2 

3import django.db.models.deletion 

4import simple_history.models 

5from django.conf import settings 

6from django.db import migrations, models 

7 

8import apis_core.generic.abc 

9 

10 

11class Migration(migrations.Migration): 

12 initial = True 

13 

14 dependencies = [ 

15 ("apis_metainfo", "0012_remove_rootobject_deprecated_name"), 

16 ("contenttypes", "0002_remove_content_type_name"), 

17 migrations.swappable_dependency(settings.AUTH_USER_MODEL), 

18 ] 

19 

20 operations = [ 

21 migrations.CreateModel( 

22 name="Group", 

23 fields=[ 

24 ( 

25 "rootobject_ptr", 

26 models.OneToOneField( 

27 auto_created=True, 

28 on_delete=django.db.models.deletion.CASCADE, 

29 parent_link=True, 

30 primary_key=True, 

31 serialize=False, 

32 to="apis_metainfo.rootobject", 

33 ), 

34 ), 

35 ("label", models.CharField(blank=True, default="", max_length=4096)), 

36 ], 

37 options={ 

38 "abstract": False, 

39 }, 

40 bases=("apis_metainfo.rootobject", models.Model), 

41 ), 

42 migrations.CreateModel( 

43 name="Place", 

44 fields=[ 

45 ( 

46 "rootobject_ptr", 

47 models.OneToOneField( 

48 auto_created=True, 

49 on_delete=django.db.models.deletion.CASCADE, 

50 parent_link=True, 

51 primary_key=True, 

52 serialize=False, 

53 to="apis_metainfo.rootobject", 

54 ), 

55 ), 

56 ("label", models.CharField(blank=True, default="", max_length=4096)), 

57 ("longitude", models.FloatField(blank=True, null=True)), 

58 ("latitude", models.FloatField(blank=True, null=True)), 

59 ], 

60 options={ 

61 "abstract": False, 

62 }, 

63 bases=("apis_metainfo.rootobject", models.Model), 

64 ), 

65 migrations.CreateModel( 

66 name="Profession", 

67 fields=[ 

68 ( 

69 "id", 

70 models.BigAutoField( 

71 auto_created=True, 

72 primary_key=True, 

73 serialize=False, 

74 verbose_name="ID", 

75 ), 

76 ), 

77 ("name", models.CharField(blank=True, default="", max_length=1024)), 

78 ], 

79 bases=(apis_core.generic.abc.GenericModel, models.Model), 

80 ), 

81 migrations.CreateModel( 

82 name="Person", 

83 fields=[ 

84 ( 

85 "rootobject_ptr", 

86 models.OneToOneField( 

87 auto_created=True, 

88 on_delete=django.db.models.deletion.CASCADE, 

89 parent_link=True, 

90 primary_key=True, 

91 serialize=False, 

92 to="apis_metainfo.rootobject", 

93 ), 

94 ), 

95 ("forename", models.CharField(blank=True, default="", max_length=4096)), 

96 ("surname", models.CharField(blank=True, default="", max_length=4096)), 

97 ("gender", models.CharField(blank=True, default="", max_length=4096)), 

98 ("date_of_birth", models.DateField(blank=True, null=True)), 

99 ("date_of_death", models.DateField(blank=True, null=True)), 

100 ( 

101 "profession", 

102 models.ManyToManyField(blank=True, to="sample_project.profession"), 

103 ), 

104 ], 

105 options={ 

106 "abstract": False, 

107 }, 

108 bases=("apis_metainfo.rootobject", models.Model), 

109 ), 

110 migrations.CreateModel( 

111 name="VersionGroup", 

112 fields=[ 

113 ( 

114 "rootobject_ptr", 

115 models.ForeignKey( 

116 auto_created=True, 

117 blank=True, 

118 db_constraint=False, 

119 null=True, 

120 on_delete=django.db.models.deletion.DO_NOTHING, 

121 parent_link=True, 

122 related_name="+", 

123 to="apis_metainfo.rootobject", 

124 ), 

125 ), 

126 ( 

127 "id", 

128 models.IntegerField( 

129 auto_created=True, blank=True, db_index=True, verbose_name="ID" 

130 ), 

131 ), 

132 ( 

133 "version_tag", 

134 models.CharField(blank=True, max_length=255, null=True), 

135 ), 

136 ("label", models.CharField(blank=True, default="", max_length=4096)), 

137 ("history_id", models.AutoField(primary_key=True, serialize=False)), 

138 ("history_date", models.DateTimeField(db_index=True)), 

139 ("history_change_reason", models.CharField(max_length=100, null=True)), 

140 ( 

141 "history_type", 

142 models.CharField( 

143 choices=[("+", "Created"), ("~", "Changed"), ("-", "Deleted")], 

144 max_length=1, 

145 ), 

146 ), 

147 ( 

148 "history_user", 

149 models.ForeignKey( 

150 null=True, 

151 on_delete=django.db.models.deletion.SET_NULL, 

152 related_name="+", 

153 to=settings.AUTH_USER_MODEL, 

154 ), 

155 ), 

156 ( 

157 "self_contenttype", 

158 models.ForeignKey( 

159 blank=True, 

160 db_constraint=False, 

161 editable=False, 

162 null=True, 

163 on_delete=django.db.models.deletion.DO_NOTHING, 

164 related_name="+", 

165 to="contenttypes.contenttype", 

166 ), 

167 ), 

168 ], 

169 options={ 

170 "verbose_name": "Version", 

171 "verbose_name_plural": "Versions", 

172 "ordering": ("-history_date", "-history_id"), 

173 "get_latest_by": ("history_date", "history_id"), 

174 }, 

175 bases=( 

176 simple_history.models.HistoricalChanges, 

177 models.Model, 

178 apis_core.generic.abc.GenericModel, 

179 ), 

180 ), 

181 migrations.CreateModel( 

182 name="VersionPerson", 

183 fields=[ 

184 ( 

185 "rootobject_ptr", 

186 models.ForeignKey( 

187 auto_created=True, 

188 blank=True, 

189 db_constraint=False, 

190 null=True, 

191 on_delete=django.db.models.deletion.DO_NOTHING, 

192 parent_link=True, 

193 related_name="+", 

194 to="apis_metainfo.rootobject", 

195 ), 

196 ), 

197 ( 

198 "id", 

199 models.IntegerField( 

200 auto_created=True, blank=True, db_index=True, verbose_name="ID" 

201 ), 

202 ), 

203 ( 

204 "version_tag", 

205 models.CharField(blank=True, max_length=255, null=True), 

206 ), 

207 ("forename", models.CharField(blank=True, default="", max_length=4096)), 

208 ("surname", models.CharField(blank=True, default="", max_length=4096)), 

209 ("gender", models.CharField(blank=True, default="", max_length=4096)), 

210 ("date_of_birth", models.DateField(blank=True, null=True)), 

211 ("date_of_death", models.DateField(blank=True, null=True)), 

212 ("history_id", models.AutoField(primary_key=True, serialize=False)), 

213 ("history_date", models.DateTimeField(db_index=True)), 

214 ("history_change_reason", models.CharField(max_length=100, null=True)), 

215 ( 

216 "history_type", 

217 models.CharField( 

218 choices=[("+", "Created"), ("~", "Changed"), ("-", "Deleted")], 

219 max_length=1, 

220 ), 

221 ), 

222 ( 

223 "history_user", 

224 models.ForeignKey( 

225 null=True, 

226 on_delete=django.db.models.deletion.SET_NULL, 

227 related_name="+", 

228 to=settings.AUTH_USER_MODEL, 

229 ), 

230 ), 

231 ( 

232 "self_contenttype", 

233 models.ForeignKey( 

234 blank=True, 

235 db_constraint=False, 

236 editable=False, 

237 null=True, 

238 on_delete=django.db.models.deletion.DO_NOTHING, 

239 related_name="+", 

240 to="contenttypes.contenttype", 

241 ), 

242 ), 

243 ], 

244 options={ 

245 "verbose_name": "Version", 

246 "verbose_name_plural": "Versions", 

247 "ordering": ("-history_date", "-history_id"), 

248 "get_latest_by": ("history_date", "history_id"), 

249 }, 

250 bases=( 

251 simple_history.models.HistoricalChanges, 

252 models.Model, 

253 apis_core.generic.abc.GenericModel, 

254 ), 

255 ), 

256 migrations.CreateModel( 

257 name="VersionPerson_profession", 

258 fields=[ 

259 ( 

260 "id", 

261 models.BigIntegerField( 

262 auto_created=True, blank=True, db_index=True, verbose_name="ID" 

263 ), 

264 ), 

265 ("m2m_history_id", models.AutoField(primary_key=True, serialize=False)), 

266 ( 

267 "history", 

268 models.ForeignKey( 

269 db_constraint=False, 

270 on_delete=django.db.models.deletion.DO_NOTHING, 

271 to="sample_project.versionperson", 

272 ), 

273 ), 

274 ( 

275 "person", 

276 models.ForeignKey( 

277 blank=True, 

278 db_constraint=False, 

279 db_tablespace="", 

280 null=True, 

281 on_delete=django.db.models.deletion.DO_NOTHING, 

282 related_name="+", 

283 to="sample_project.person", 

284 ), 

285 ), 

286 ( 

287 "profession", 

288 models.ForeignKey( 

289 blank=True, 

290 db_constraint=False, 

291 db_tablespace="", 

292 null=True, 

293 on_delete=django.db.models.deletion.DO_NOTHING, 

294 related_name="+", 

295 to="sample_project.profession", 

296 ), 

297 ), 

298 ], 

299 options={ 

300 "verbose_name": "VersionPerson_profession", 

301 }, 

302 bases=(simple_history.models.HistoricalChanges, models.Model), 

303 ), 

304 migrations.CreateModel( 

305 name="VersionPlace", 

306 fields=[ 

307 ( 

308 "rootobject_ptr", 

309 models.ForeignKey( 

310 auto_created=True, 

311 blank=True, 

312 db_constraint=False, 

313 null=True, 

314 on_delete=django.db.models.deletion.DO_NOTHING, 

315 parent_link=True, 

316 related_name="+", 

317 to="apis_metainfo.rootobject", 

318 ), 

319 ), 

320 ( 

321 "id", 

322 models.IntegerField( 

323 auto_created=True, blank=True, db_index=True, verbose_name="ID" 

324 ), 

325 ), 

326 ( 

327 "version_tag", 

328 models.CharField(blank=True, max_length=255, null=True), 

329 ), 

330 ("label", models.CharField(blank=True, default="", max_length=4096)), 

331 ("longitude", models.FloatField(blank=True, null=True)), 

332 ("latitude", models.FloatField(blank=True, null=True)), 

333 ("history_id", models.AutoField(primary_key=True, serialize=False)), 

334 ("history_date", models.DateTimeField(db_index=True)), 

335 ("history_change_reason", models.CharField(max_length=100, null=True)), 

336 ( 

337 "history_type", 

338 models.CharField( 

339 choices=[("+", "Created"), ("~", "Changed"), ("-", "Deleted")], 

340 max_length=1, 

341 ), 

342 ), 

343 ( 

344 "history_user", 

345 models.ForeignKey( 

346 null=True, 

347 on_delete=django.db.models.deletion.SET_NULL, 

348 related_name="+", 

349 to=settings.AUTH_USER_MODEL, 

350 ), 

351 ), 

352 ( 

353 "self_contenttype", 

354 models.ForeignKey( 

355 blank=True, 

356 db_constraint=False, 

357 editable=False, 

358 null=True, 

359 on_delete=django.db.models.deletion.DO_NOTHING, 

360 related_name="+", 

361 to="contenttypes.contenttype", 

362 ), 

363 ), 

364 ], 

365 options={ 

366 "verbose_name": "Version", 

367 "verbose_name_plural": "Versions", 

368 "ordering": ("-history_date", "-history_id"), 

369 "get_latest_by": ("history_date", "history_id"), 

370 }, 

371 bases=( 

372 simple_history.models.HistoricalChanges, 

373 models.Model, 

374 apis_core.generic.abc.GenericModel, 

375 ), 

376 ), 

377 ]