Debian Codegraph @

maintenance/abstractSchemaChanges/patch-uploadstash-us_size_to_bigint.json

raw symbols SCIP
1 {
2 "comment": "Increaes us_size to bigint (T191805)",
3 "before":
4 {
5 "name": "uploadstash",
6 "comment": "Store information about newly uploaded files before they're moved into the actual filestore",
7 "columns": [
8 {
9 "name": "us_id",
10 "type": "integer",
11 "options": {
12 "autoincrement": true,
13 "unsigned": true,
14 "notnull": true
15 }
16 },
17 {
18 "name": "us_user",
19 "comment": "the user who uploaded the file.",
20 "type": "integer",
21 "options": {
22 "unsigned": true,
23 "notnull": true
24 }
25 },
26 {
27 "name": "us_key",
28 "comment": "file key. this is how applications actually search for the file. this might go away, or become the primary key.",
29 "type": "string",
30 "options": {
31 "notnull": true,
32 "length": 255
33 }
34 },
35 {
36 "name": "us_orig_path",
37 "comment": "the original path",
38 "type": "string",
39 "options": {
40 "notnull": true,
41 "length": 255
42 }
43 },
44 {
45 "name": "us_path",
46 "comment": "the temporary path at which the file is actually stored",
47 "type": "string",
48 "options": {
49 "notnull": true,
50 "length": 255
51 }
52 },
53 {
54 "name": "us_source_type",
55 "comment": "which type of upload the file came from (sometimes)",
56 "type": "string",
57 "options": {
58 "notnull": false,
59 "length": 50
60 }
61 },
62 {
63 "name": "us_timestamp",
64 "comment": "the date/time on which the file was added",
65 "type": "mwtimestamp",
66 "options": {
67 "notnull": true
68 }
69 },
70 {
71 "name": "us_status",
72 "type": "string",
73 "options": {
74 "notnull": true,
75 "length": 50
76 }
77 },
78 {
79 "name": "us_chunk_inx",
80 "comment": "chunk counter starts at 0, current offset is stored in us_size",
81 "type": "integer",
82 "options": {
83 "unsigned": true,
84 "notnull": false
85 }
86 },
87 {
88 "name": "us_props",
89 "comment": "Serialized file properties from FSFile::getProps()",
90 "type": "blob",
91 "options": {
92 "notnull": false,
93 "length": 65530
94 }
95 },
96 {
97 "name": "us_size",
98 "comment": "file size in bytes",
99 "type": "integer",
100 "options": {
101 "unsigned": true,
102 "notnull": true
103 }
104 },
105 {
106 "name": "us_sha1",
107 "comment": "this hash comes from FSFile::getSha1Base36(), and is 31 characters",
108 "type": "string",
109 "options": {
110 "notnull": true,
111 "length": 31
112 }
113 },
114 {
115 "name": "us_mime",
116 "type": "string",
117 "options": {
118 "notnull": false,
119 "length": 255
120 }
121 },
122 {
123 "name": "us_media_type",
124 "comment": "Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table",
125 "type": "mwenum",
126 "options": { "notnull": false, "default": null,
127 "fixed": true,
128 "CustomSchemaOptions": {
129 "enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
130 }
131 }
132 },
133 {
134 "name": "us_image_width",
135 "comment": "image-specific properties",
136 "type": "integer",
137 "options": {
138 "unsigned": true,
139 "notnull": false
140 }
141 },
142 {
143 "name": "us_image_height",
144 "type": "integer",
145 "options": {
146 "unsigned": true,
147 "notnull": false
148 }
149 },
150 {
151 "name": "us_image_bits",
152 "type": "smallint",
153 "options": {
154 "unsigned": true,
155 "notnull": false
156 }
157 }
158 ],
159 "indexes": [
160 {
161 "name": "us_user",
162 "comment": "sometimes there's a delete for all of a user's stuff.",
163 "columns": [
164 "us_user"
165 ],
166 "unique": false
167 },
168 {
169 "name": "us_key",
170 "comment": "pick out files by key, enforce key uniqueness",
171 "columns": [
172 "us_key"
173 ],
174 "unique": true
175 },
176 {
177 "name": "us_timestamp",
178 "comment": "the abandoned upload cleanup script needs this",
179 "columns": [
180 "us_timestamp"
181 ],
182 "unique": false
183 }
184 ],
185 "pk": [
186 "us_id"
187 ]
188 },
189 "after":
190 {
191 "name": "uploadstash",
192 "comment": "Store information about newly uploaded files before they're moved into the actual filestore",
193 "columns": [
194 {
195 "name": "us_id",
196 "type": "integer",
197 "options": {
198 "autoincrement": true,
199 "unsigned": true,
200 "notnull": true
201 }
202 },
203 {
204 "name": "us_user",
205 "comment": "the user who uploaded the file.",
206 "type": "integer",
207 "options": {
208 "unsigned": true,
209 "notnull": true
210 }
211 },
212 {
213 "name": "us_key",
214 "comment": "file key. this is how applications actually search for the file. this might go away, or become the primary key.",
215 "type": "string",
216 "options": {
217 "notnull": true,
218 "length": 255
219 }
220 },
221 {
222 "name": "us_orig_path",
223 "comment": "the original path",
224 "type": "string",
225 "options": {
226 "notnull": true,
227 "length": 255
228 }
229 },
230 {
231 "name": "us_path",
232 "comment": "the temporary path at which the file is actually stored",
233 "type": "string",
234 "options": {
235 "notnull": true,
236 "length": 255
237 }
238 },
239 {
240 "name": "us_source_type",
241 "comment": "which type of upload the file came from (sometimes)",
242 "type": "string",
243 "options": {
244 "notnull": false,
245 "length": 50
246 }
247 },
248 {
249 "name": "us_timestamp",
250 "comment": "the date/time on which the file was added",
251 "type": "mwtimestamp",
252 "options": {
253 "notnull": true
254 }
255 },
256 {
257 "name": "us_status",
258 "type": "string",
259 "options": {
260 "notnull": true,
261 "length": 50
262 }
263 },
264 {
265 "name": "us_chunk_inx",
266 "comment": "chunk counter starts at 0, current offset is stored in us_size",
267 "type": "integer",
268 "options": {
269 "unsigned": true,
270 "notnull": false
271 }
272 },
273 {
274 "name": "us_props",
275 "comment": "Serialized file properties from FSFile::getProps()",
276 "type": "blob",
277 "options": {
278 "notnull": false,
279 "length": 65530
280 }
281 },
282 {
283 "name": "us_size",
284 "comment": "file size in bytes",
285 "type": "bigint",
286 "options": {
287 "unsigned": true,
288 "notnull": true
289 }
290 },
291 {
292 "name": "us_sha1",
293 "comment": "this hash comes from FSFile::getSha1Base36(), and is 31 characters",
294 "type": "string",
295 "options": {
296 "notnull": true,
297 "length": 31
298 }
299 },
300 {
301 "name": "us_mime",
302 "type": "string",
303 "options": {
304 "notnull": false,
305 "length": 255
306 }
307 },
308 {
309 "name": "us_media_type",
310 "comment": "Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table",
311 "type": "mwenum",
312 "options": { "notnull": false, "default": null,
313 "fixed": true,
314 "CustomSchemaOptions": {
315 "enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
316 }
317 }
318 },
319 {
320 "name": "us_image_width",
321 "comment": "image-specific properties",
322 "type": "integer",
323 "options": {
324 "unsigned": true,
325 "notnull": false
326 }
327 },
328 {
329 "name": "us_image_height",
330 "type": "integer",
331 "options": {
332 "unsigned": true,
333 "notnull": false
334 }
335 },
336 {
337 "name": "us_image_bits",
338 "type": "smallint",
339 "options": {
340 "unsigned": true,
341 "notnull": false
342 }
343 }
344 ],
345 "indexes": [
346 {
347 "name": "us_user",
348 "comment": "sometimes there's a delete for all of a user's stuff.",
349 "columns": [
350 "us_user"
351 ],
352 "unique": false
353 },
354 {
355 "name": "us_key",
356 "comment": "pick out files by key, enforce key uniqueness",
357 "columns": [
358 "us_key"
359 ],
360 "unique": true
361 },
362 {
363 "name": "us_timestamp",
364 "comment": "the abandoned upload cleanup script needs this",
365 "columns": [
366 "us_timestamp"
367 ],
368 "unique": false
369 }
370 ],
371 "pk": [
372 "us_id"
373 ]
374 }
375 }