Debian Codegraph @

maintenance/abstractSchemaChanges/patch-oldimage-oi_timestamp.json

raw symbols SCIP
1 {
2 "comment": "Add index on oi_timestamp (T279982)",
3 "before": {
4 "name": "oldimage",
5 "comment": "Previous revisions of uploaded files. Awkwardly, image rows have to be moved into this table at re-upload time.",
6 "columns": [
7 {
8 "name": "oi_name",
9 "comment": "Base filename: key to image.img_name",
10 "type": "binary",
11 "options": {
12 "notnull": true,
13 "default": "",
14 "length": 255
15 }
16 },
17 {
18 "name": "oi_archive_name",
19 "comment": "Filename of the archived file. This is generally a timestamp and '!' prepended to the base name.",
20 "type": "binary",
21 "options": {
22 "notnull": true,
23 "default": "",
24 "length": 255
25 }
26 },
27 {
28 "name": "oi_size",
29 "type": "integer",
30 "options": {
31 "unsigned": true,
32 "notnull": true,
33 "default": 0
34 }
35 },
36 {
37 "name": "oi_width",
38 "type": "integer",
39 "options": {
40 "notnull": true,
41 "default": 0
42 }
43 },
44 {
45 "name": "oi_height",
46 "type": "integer",
47 "options": {
48 "notnull": true,
49 "default": 0
50 }
51 },
52 {
53 "name": "oi_bits",
54 "type": "integer",
55 "options": {
56 "notnull": true,
57 "default": 0
58 }
59 },
60 {
61 "name": "oi_description_id",
62 "type": "bigint",
63 "options": {
64 "unsigned": true,
65 "notnull": true
66 }
67 },
68 {
69 "name": "oi_actor",
70 "type": "bigint",
71 "options": {
72 "unsigned": true,
73 "notnull": true
74 }
75 },
76 {
77 "name": "oi_timestamp",
78 "type": "mwtimestamp",
79 "options": {
80 "notnull": true,
81 "length": 14
82 }
83 },
84 {
85 "name": "oi_metadata",
86 "type": "blob",
87 "options": {
88 "notnull": true,
89 "length": 16777215
90 }
91 },
92 {
93 "name": "oi_media_type",
94 "type": "mwenum",
95 "options": {
96 "notnull": false,
97 "default": null,
98 "CustomSchemaOptions": {
99 "enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
100 }
101 }
102 },
103 {
104 "name": "oi_major_mime",
105 "type": "mwenum",
106 "options": {
107 "notnull": true,
108 "default": "unknown",
109 "CustomSchemaOptions": {
110 "enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
111 }
112 }
113 },
114 {
115 "name": "oi_minor_mime",
116 "type": "binary",
117 "options": {
118 "notnull": true,
119 "default": "unknown",
120 "length": 100
121 }
122 },
123 {
124 "name": "oi_deleted",
125 "type": "mwtinyint",
126 "options": {
127 "unsigned": true,
128 "notnull": true,
129 "default": 0
130 }
131 },
132 {
133 "name": "oi_sha1",
134 "type": "binary",
135 "options": {
136 "notnull": true,
137 "default": "",
138 "length": 32
139 }
140 }
141 ],
142 "indexes": [
143 {
144 "name": "oi_actor_timestamp",
145 "columns": [
146 "oi_actor",
147 "oi_timestamp"
148 ],
149 "unique": false
150 },
151 {
152 "name": "oi_name_timestamp",
153 "columns": [
154 "oi_name",
155 "oi_timestamp"
156 ],
157 "unique": false
158 },
159 {
160 "name": "oi_name_archive_name",
161 "comment": "oi_archive_name truncated to 14 to avoid key length overflow",
162 "columns": [
163 "oi_name",
164 "oi_archive_name"
165 ],
166 "unique": false,
167 "options": { "lengths": [ null, 14 ] }
168 },
169 {
170 "name": "oi_sha1",
171 "columns": [
172 "oi_sha1"
173 ],
174 "unique": false,
175 "options": { "lengths": [ 10 ] }
176 }
177 ]
178 },
179 "after": {
180 "name": "oldimage",
181 "comment": "Previous revisions of uploaded files. Awkwardly, image rows have to be moved into this table at re-upload time.",
182 "columns": [
183 {
184 "name": "oi_name",
185 "comment": "Base filename: key to image.img_name",
186 "type": "binary",
187 "options": {
188 "notnull": true,
189 "default": "",
190 "length": 255
191 }
192 },
193 {
194 "name": "oi_archive_name",
195 "comment": "Filename of the archived file. This is generally a timestamp and '!' prepended to the base name.",
196 "type": "binary",
197 "options": {
198 "notnull": true,
199 "default": "",
200 "length": 255
201 }
202 },
203 {
204 "name": "oi_size",
205 "type": "integer",
206 "options": {
207 "unsigned": true,
208 "notnull": true,
209 "default": 0
210 }
211 },
212 {
213 "name": "oi_width",
214 "type": "integer",
215 "options": {
216 "notnull": true,
217 "default": 0
218 }
219 },
220 {
221 "name": "oi_height",
222 "type": "integer",
223 "options": {
224 "notnull": true,
225 "default": 0
226 }
227 },
228 {
229 "name": "oi_bits",
230 "type": "integer",
231 "options": {
232 "notnull": true,
233 "default": 0
234 }
235 },
236 {
237 "name": "oi_description_id",
238 "type": "bigint",
239 "options": {
240 "unsigned": true,
241 "notnull": true
242 }
243 },
244 {
245 "name": "oi_actor",
246 "type": "bigint",
247 "options": {
248 "unsigned": true,
249 "notnull": true
250 }
251 },
252 {
253 "name": "oi_timestamp",
254 "type": "mwtimestamp",
255 "options": {
256 "notnull": true,
257 "length": 14
258 }
259 },
260 {
261 "name": "oi_metadata",
262 "type": "blob",
263 "options": {
264 "notnull": true,
265 "length": 16777215
266 }
267 },
268 {
269 "name": "oi_media_type",
270 "type": "mwenum",
271 "options": {
272 "notnull": false,
273 "default": null,
274 "CustomSchemaOptions": {
275 "enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
276 }
277 }
278 },
279 {
280 "name": "oi_major_mime",
281 "type": "mwenum",
282 "options": {
283 "notnull": true,
284 "default": "unknown",
285 "CustomSchemaOptions": {
286 "enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
287 }
288 }
289 },
290 {
291 "name": "oi_minor_mime",
292 "type": "binary",
293 "options": {
294 "notnull": true,
295 "default": "unknown",
296 "length": 100
297 }
298 },
299 {
300 "name": "oi_deleted",
301 "type": "mwtinyint",
302 "options": {
303 "unsigned": true,
304 "notnull": true,
305 "default": 0
306 }
307 },
308 {
309 "name": "oi_sha1",
310 "type": "binary",
311 "options": {
312 "notnull": true,
313 "default": "",
314 "length": 32
315 }
316 }
317 ],
318 "indexes": [
319 {
320 "name": "oi_actor_timestamp",
321 "columns": [
322 "oi_actor",
323 "oi_timestamp"
324 ],
325 "unique": false
326 },
327 {
328 "name": "oi_name_timestamp",
329 "columns": [
330 "oi_name",
331 "oi_timestamp"
332 ],
333 "unique": false
334 },
335 {
336 "name": "oi_name_archive_name",
337 "comment": "oi_archive_name truncated to 14 to avoid key length overflow",
338 "columns": [
339 "oi_name",
340 "oi_archive_name"
341 ],
342 "unique": false,
343 "options": { "lengths": [ null, 14 ] }
344 },
345 {
346 "name": "oi_sha1",
347 "columns": [
348 "oi_sha1"
349 ],
350 "unique": false,
351 "options": { "lengths": [ 10 ] }
352 },
353 {
354 "name": "oi_timestamp",
355 "comment": "Used by Special:ListFiles",
356 "columns": [
357 "oi_timestamp"
358 ],
359 "unique": false
360 }
361 ]
362 }
363 }