Debian Codegraph @

maintenance/abstractSchemaChanges/patch-oldimage-oi_size_to_bigint.json

raw symbols SCIP
1 {
2 "comment": "Increase oi_size to be a bigint (T191805)",
3 "before":
4 {
5 "name": "oldimage",
6 "comment": "Previous revisions of uploaded files. Awkwardly, image rows have to be moved into this table at re-upload time.",
7 "columns": [
8 {
9 "name": "oi_name",
10 "comment": "Base filename: key to image.img_name",
11 "type": "binary",
12 "options": {
13 "notnull": true,
14 "default": "",
15 "length": 255
16 }
17 },
18 {
19 "name": "oi_archive_name",
20 "comment": "Filename of the archived file. This is generally a timestamp and '!' prepended to the base name.",
21 "type": "binary",
22 "options": {
23 "notnull": true,
24 "default": "",
25 "length": 255
26 }
27 },
28 {
29 "name": "oi_size",
30 "type": "integer",
31 "options": {
32 "unsigned": true,
33 "notnull": true,
34 "default": 0
35 }
36 },
37 {
38 "name": "oi_width",
39 "type": "integer",
40 "options": {
41 "notnull": true,
42 "default": 0
43 }
44 },
45 {
46 "name": "oi_height",
47 "type": "integer",
48 "options": {
49 "notnull": true,
50 "default": 0
51 }
52 },
53 {
54 "name": "oi_bits",
55 "type": "integer",
56 "options": {
57 "notnull": true,
58 "default": 0
59 }
60 },
61 {
62 "name": "oi_description_id",
63 "type": "bigint",
64 "options": {
65 "unsigned": true,
66 "notnull": true
67 }
68 },
69 {
70 "name": "oi_actor",
71 "type": "bigint",
72 "options": {
73 "unsigned": true,
74 "notnull": true
75 }
76 },
77 {
78 "name": "oi_timestamp",
79 "type": "mwtimestamp",
80 "options": {
81 "notnull": true
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 "name": "oi_timestamp",
179 "comment": "Used by Special:ListFiles",
180 "columns": [
181 "oi_timestamp"
182 ],
183 "unique": false
184 }
185 ]
186 },
187 "after":
188 {
189 "name": "oldimage",
190 "comment": "Previous revisions of uploaded files. Awkwardly, image rows have to be moved into this table at re-upload time.",
191 "columns": [
192 {
193 "name": "oi_name",
194 "comment": "Base filename: key to image.img_name",
195 "type": "binary",
196 "options": {
197 "notnull": true,
198 "default": "",
199 "length": 255
200 }
201 },
202 {
203 "name": "oi_archive_name",
204 "comment": "Filename of the archived file. This is generally a timestamp and '!' prepended to the base name.",
205 "type": "binary",
206 "options": {
207 "notnull": true,
208 "default": "",
209 "length": 255
210 }
211 },
212 {
213 "name": "oi_size",
214 "type": "bigint",
215 "options": {
216 "unsigned": true,
217 "notnull": true,
218 "default": 0
219 }
220 },
221 {
222 "name": "oi_width",
223 "type": "integer",
224 "options": {
225 "notnull": true,
226 "default": 0
227 }
228 },
229 {
230 "name": "oi_height",
231 "type": "integer",
232 "options": {
233 "notnull": true,
234 "default": 0
235 }
236 },
237 {
238 "name": "oi_bits",
239 "type": "integer",
240 "options": {
241 "notnull": true,
242 "default": 0
243 }
244 },
245 {
246 "name": "oi_description_id",
247 "type": "bigint",
248 "options": {
249 "unsigned": true,
250 "notnull": true
251 }
252 },
253 {
254 "name": "oi_actor",
255 "type": "bigint",
256 "options": {
257 "unsigned": true,
258 "notnull": true
259 }
260 },
261 {
262 "name": "oi_timestamp",
263 "type": "mwtimestamp",
264 "options": {
265 "notnull": true
266 }
267 },
268 {
269 "name": "oi_metadata",
270 "type": "blob",
271 "options": {
272 "notnull": true,
273 "length": 16777215
274 }
275 },
276 {
277 "name": "oi_media_type",
278 "type": "mwenum",
279 "options": {
280 "notnull": false,
281 "default": null,
282 "CustomSchemaOptions": {
283 "enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
284 }
285 }
286 },
287 {
288 "name": "oi_major_mime",
289 "type": "mwenum",
290 "options": {
291 "notnull": true,
292 "default": "unknown",
293 "CustomSchemaOptions": {
294 "enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
295 }
296 }
297 },
298 {
299 "name": "oi_minor_mime",
300 "type": "binary",
301 "options": {
302 "notnull": true,
303 "default": "unknown",
304 "length": 100
305 }
306 },
307 {
308 "name": "oi_deleted",
309 "type": "mwtinyint",
310 "options": {
311 "unsigned": true,
312 "notnull": true,
313 "default": 0
314 }
315 },
316 {
317 "name": "oi_sha1",
318 "type": "binary",
319 "options": {
320 "notnull": true,
321 "default": "",
322 "length": 32
323 }
324 }
325 ],
326 "indexes": [
327 {
328 "name": "oi_actor_timestamp",
329 "columns": [
330 "oi_actor",
331 "oi_timestamp"
332 ],
333 "unique": false
334 },
335 {
336 "name": "oi_name_timestamp",
337 "columns": [
338 "oi_name",
339 "oi_timestamp"
340 ],
341 "unique": false
342 },
343 {
344 "name": "oi_name_archive_name",
345 "comment": "oi_archive_name truncated to 14 to avoid key length overflow",
346 "columns": [
347 "oi_name",
348 "oi_archive_name"
349 ],
350 "unique": false,
351 "options": { "lengths": [ null, 14 ] }
352 },
353 {
354 "name": "oi_sha1",
355 "columns": [
356 "oi_sha1"
357 ],
358 "unique": false,
359 "options": { "lengths": [ 10 ] }
360 },
361 {
362 "name": "oi_timestamp",
363 "comment": "Used by Special:ListFiles",
364 "columns": [
365 "oi_timestamp"
366 ],
367 "unique": false
368 }
369 ]
370 }
371 }