Debian Codegraph @

maintenance/abstractSchemaChanges/patch-filearchive-fa_id.json

raw symbols SCIP
1 {
2 "comment": "Set unsigned true for fa_id in filearchive table",
3 "before": {
4 "name": "filearchive",
5 "comment": "Record of deleted file data",
6 "columns": [
7 {
8 "name": "fa_id",
9 "comment": "Unique row id",
10 "type": "integer",
11 "options": {
12 "autoincrement": true,
13 "notnull": true
14 }
15 },
16 {
17 "name": "fa_name",
18 "comment": "Original base filename; key to image.img_name, page.page_title, etc",
19 "type": "binary",
20 "options": {
21 "notnull": true,
22 "default": "",
23 "length": 255
24 }
25 },
26 {
27 "name": "fa_archive_name",
28 "comment": "Filename of archived file, if an old revision",
29 "type": "binary",
30 "options": {
31 "notnull": false,
32 "default": "",
33 "length": 255
34 }
35 },
36 {
37 "name": "fa_storage_group",
38 "comment": "Which storage bin (directory tree or object store) the file data is stored in. Should be 'deleted' for files that have been deleted; any other bin is not yet in use.",
39 "type": "binary",
40 "options": {
41 "notnull": false,
42 "length": 16
43 }
44 },
45 {
46 "name": "fa_storage_key",
47 "comment": "SHA-1 of the file contents plus extension, used as a key for storage. eg 8f8a562add37052a1848ff7771a2c515db94baa9.jpg. If NULL, the file was missing at deletion time or has been purged from the archival storage.",
48 "type": "binary",
49 "options": {
50 "notnull": false,
51 "default": "",
52 "length": 64
53 }
54 },
55 {
56 "name": "fa_deleted_user",
57 "type": "integer",
58 "options": {
59 "notnull": false
60 }
61 },
62 {
63 "name": "fa_deleted_timestamp",
64 "type": "mwtimestamp",
65 "options": {
66 "notnull": false,
67 "length": 14
68 }
69 },
70 {
71 "name": "fa_deleted_reason_id",
72 "type": "bigint",
73 "options": {
74 "unsigned": true,
75 "notnull": true
76 }
77 },
78 {
79 "name": "fa_size",
80 "type": "integer",
81 "options": {
82 "unsigned": true,
83 "notnull": false,
84 "default": 0
85 }
86 },
87 {
88 "name": "fa_width",
89 "type": "integer",
90 "options": {
91 "notnull": false,
92 "default": 0
93 }
94 },
95 {
96 "name": "fa_height",
97 "type": "integer",
98 "options": {
99 "notnull": false,
100 "default": 0
101 }
102 },
103 {
104 "name": "fa_metadata",
105 "type": "blob",
106 "options": {
107 "notnull": false,
108 "length": 16777215
109 }
110 },
111 {
112 "name": "fa_bits",
113 "type": "integer",
114 "options": {
115 "notnull": false,
116 "default": 0
117 }
118 },
119 {
120 "name": "fa_media_type",
121 "type": "mwenum",
122 "options": {
123 "notnull": false,
124 "default": null,
125 "CustomSchemaOptions": {
126 "enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
127 }
128 }
129 },
130 {
131 "name": "fa_major_mime",
132 "type": "mwenum",
133 "options": {
134 "notnull": false,
135 "default": "unknown",
136 "CustomSchemaOptions": {
137 "enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
138 }
139 }
140 },
141 {
142 "name": "fa_minor_mime",
143 "type": "binary",
144 "options": {
145 "notnull": false,
146 "default": "unknown",
147 "length": 100
148 }
149 },
150 {
151 "name": "fa_description_id",
152 "type": "bigint",
153 "options": {
154 "unsigned": true,
155 "notnull": true
156 }
157 },
158 {
159 "name": "fa_actor",
160 "type": "bigint",
161 "options": {
162 "unsigned": true,
163 "notnull": true
164 }
165 },
166 {
167 "name": "fa_timestamp",
168 "type": "mwtimestamp",
169 "options": {
170 "notnull": false,
171 "length": 14
172 }
173 },
174 {
175 "name": "fa_deleted",
176 "comment": "Visibility of deleted revisions, bitfield",
177 "type": "mwtinyint",
178 "options": {
179 "unsigned": true,
180 "notnull": true,
181 "default": 0
182 }
183 },
184 {
185 "name": "fa_sha1",
186 "comment": "sha1 hash of file content",
187 "type": "binary",
188 "options": {
189 "notnull": true,
190 "default": "",
191 "length": 32
192 }
193 }
194 ],
195 "indexes": [
196 {
197 "name": "fa_name",
198 "comment": "pick out by image name",
199 "columns": [
200 "fa_name",
201 "fa_timestamp"
202 ],
203 "unique": false
204 },
205 {
206 "name": "fa_storage_group",
207 "comment": "pick out dupe files",
208 "columns": [
209 "fa_storage_group",
210 "fa_storage_key"
211 ],
212 "unique": false
213 },
214 {
215 "name": "fa_deleted_timestamp",
216 "comment": "sort by deletion time",
217 "columns": [
218 "fa_deleted_timestamp"
219 ],
220 "unique": false
221 },
222 {
223 "name": "fa_actor_timestamp",
224 "comment": "sort by uploader",
225 "columns": [
226 "fa_actor",
227 "fa_timestamp"
228 ],
229 "unique": false
230 },
231 {
232 "name": "fa_sha1",
233 "comment": "find file by sha1, 10 bytes will be enough for hashes to be indexed",
234 "columns": [
235 "fa_sha1"
236 ],
237 "unique": false,
238 "options": { "lengths": [ 10 ] }
239 }
240 ],
241 "pk": [
242 "fa_id"
243 ]
244 },
245 "after": {
246 "name": "filearchive",
247 "comment": "Record of deleted file data",
248 "columns": [
249 {
250 "name": "fa_id",
251 "comment": "Unique row id",
252 "type": "integer",
253 "options": {
254 "autoincrement": true,
255 "unsigned": true,
256 "notnull": true
257 }
258 },
259 {
260 "name": "fa_name",
261 "comment": "Original base filename; key to image.img_name, page.page_title, etc",
262 "type": "binary",
263 "options": {
264 "notnull": true,
265 "default": "",
266 "length": 255
267 }
268 },
269 {
270 "name": "fa_archive_name",
271 "comment": "Filename of archived file, if an old revision",
272 "type": "binary",
273 "options": {
274 "notnull": false,
275 "default": "",
276 "length": 255
277 }
278 },
279 {
280 "name": "fa_storage_group",
281 "comment": "Which storage bin (directory tree or object store) the file data is stored in. Should be 'deleted' for files that have been deleted; any other bin is not yet in use.",
282 "type": "binary",
283 "options": {
284 "notnull": false,
285 "length": 16
286 }
287 },
288 {
289 "name": "fa_storage_key",
290 "comment": "SHA-1 of the file contents plus extension, used as a key for storage. eg 8f8a562add37052a1848ff7771a2c515db94baa9.jpg. If NULL, the file was missing at deletion time or has been purged from the archival storage.",
291 "type": "binary",
292 "options": {
293 "notnull": false,
294 "default": "",
295 "length": 64
296 }
297 },
298 {
299 "name": "fa_deleted_user",
300 "type": "integer",
301 "options": {
302 "notnull": false
303 }
304 },
305 {
306 "name": "fa_deleted_timestamp",
307 "type": "mwtimestamp",
308 "options": {
309 "notnull": false,
310 "length": 14
311 }
312 },
313 {
314 "name": "fa_deleted_reason_id",
315 "type": "bigint",
316 "options": {
317 "unsigned": true,
318 "notnull": true
319 }
320 },
321 {
322 "name": "fa_size",
323 "type": "integer",
324 "options": {
325 "unsigned": true,
326 "notnull": false,
327 "default": 0
328 }
329 },
330 {
331 "name": "fa_width",
332 "type": "integer",
333 "options": {
334 "notnull": false,
335 "default": 0
336 }
337 },
338 {
339 "name": "fa_height",
340 "type": "integer",
341 "options": {
342 "notnull": false,
343 "default": 0
344 }
345 },
346 {
347 "name": "fa_metadata",
348 "type": "blob",
349 "options": {
350 "notnull": false,
351 "length": 16777215
352 }
353 },
354 {
355 "name": "fa_bits",
356 "type": "integer",
357 "options": {
358 "notnull": false,
359 "default": 0
360 }
361 },
362 {
363 "name": "fa_media_type",
364 "type": "mwenum",
365 "options": {
366 "notnull": false,
367 "default": null,
368 "CustomSchemaOptions": {
369 "enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
370 }
371 }
372 },
373 {
374 "name": "fa_major_mime",
375 "type": "mwenum",
376 "options": {
377 "notnull": false,
378 "default": "unknown",
379 "CustomSchemaOptions": {
380 "enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
381 }
382 }
383 },
384 {
385 "name": "fa_minor_mime",
386 "type": "binary",
387 "options": {
388 "notnull": false,
389 "default": "unknown",
390 "length": 100
391 }
392 },
393 {
394 "name": "fa_description_id",
395 "type": "bigint",
396 "options": {
397 "unsigned": true,
398 "notnull": true
399 }
400 },
401 {
402 "name": "fa_actor",
403 "type": "bigint",
404 "options": {
405 "unsigned": true,
406 "notnull": true
407 }
408 },
409 {
410 "name": "fa_timestamp",
411 "type": "mwtimestamp",
412 "options": {
413 "notnull": false,
414 "length": 14
415 }
416 },
417 {
418 "name": "fa_deleted",
419 "comment": "Visibility of deleted revisions, bitfield",
420 "type": "mwtinyint",
421 "options": {
422 "unsigned": true,
423 "notnull": true,
424 "default": 0
425 }
426 },
427 {
428 "name": "fa_sha1",
429 "comment": "sha1 hash of file content",
430 "type": "binary",
431 "options": {
432 "notnull": true,
433 "default": "",
434 "length": 32
435 }
436 }
437 ],
438 "indexes": [
439 {
440 "name": "fa_name",
441 "comment": "pick out by image name",
442 "columns": [
443 "fa_name",
444 "fa_timestamp"
445 ],
446 "unique": false
447 },
448 {
449 "name": "fa_storage_group",
450 "comment": "pick out dupe files",
451 "columns": [
452 "fa_storage_group",
453 "fa_storage_key"
454 ],
455 "unique": false
456 },
457 {
458 "name": "fa_deleted_timestamp",
459 "comment": "sort by deletion time",
460 "columns": [
461 "fa_deleted_timestamp"
462 ],
463 "unique": false
464 },
465 {
466 "name": "fa_actor_timestamp",
467 "comment": "sort by uploader",
468 "columns": [
469 "fa_actor",
470 "fa_timestamp"
471 ],
472 "unique": false
473 },
474 {
475 "name": "fa_sha1",
476 "comment": "find file by sha1, 10 bytes will be enough for hashes to be indexed",
477 "columns": [
478 "fa_sha1"
479 ],
480 "unique": false,
481 "options": { "lengths": [ 10 ] }
482 }
483 ],
484 "pk": [
485 "fa_id"
486 ]
487 }
488 }