Debian Codegraph @

maintenance/abstractSchemaChanges/patch-ipblocks-ipb_id.json

raw symbols SCIP
1 {
2 "comment": "Set unsigned true for ipb_id and ipb_parent_block_id in ipblocks table",
3 "before": {
4 "name": "ipblocks",
5 "comment": "Blocks against user accounts, IP addresses and IP ranges.",
6 "columns": [
7 {
8 "name": "ipb_id",
9 "comment": "Primary key, introduced for privacy.",
10 "type": "integer",
11 "options": {
12 "autoincrement": true,
13 "notnull": true
14 }
15 },
16 {
17 "name": "ipb_address",
18 "comment": "Blocked IP address in dotted-quad form or user name.",
19 "type": "blob",
20 "options": {
21 "notnull": true,
22 "length": 255
23 }
24 },
25 {
26 "name": "ipb_user",
27 "comment": "Blocked user ID or 0 for IP blocks.",
28 "type": "integer",
29 "options": {
30 "unsigned": true,
31 "notnull": true,
32 "default": 0
33 }
34 },
35 {
36 "name": "ipb_by_actor",
37 "comment": "Actor who made the block.",
38 "type": "bigint",
39 "options": {
40 "unsigned": true,
41 "notnull": true
42 }
43 },
44 {
45 "name": "ipb_reason_id",
46 "comment": "Key to comment_id. Text comment made by blocker.",
47 "type": "bigint",
48 "options": {
49 "unsigned": true,
50 "notnull": true
51 }
52 },
53 {
54 "name": "ipb_timestamp",
55 "comment": "Creation (or refresh) date in standard YMDHMS form. IP blocks expire automatically.",
56 "type": "mwtimestamp",
57 "options": {
58 "notnull": true
59 }
60 },
61 {
62 "name": "ipb_auto",
63 "comment": "Indicates that the IP address was banned because a banned user accessed a page through it. If this is 1, ipb_address will be hidden, and the block identified by block ID number.",
64 "type": "mwtinyint",
65 "options": {
66 "notnull": true,
67 "length": 1,
68 "default": 0
69 }
70 },
71 {
72 "name": "ipb_anon_only",
73 "comment": "If set to 1, block applies only to logged-out users",
74 "type": "mwtinyint",
75 "options": {
76 "notnull": true,
77 "length": 1,
78 "default": 0
79 }
80 },
81 {
82 "name": "ipb_create_account",
83 "comment": "Block prevents account creation from matching IP addresses",
84 "type": "mwtinyint",
85 "options": {
86 "notnull": true,
87 "length": 1,
88 "default": 1
89 }
90 },
91 {
92 "name": "ipb_enable_autoblock",
93 "comment": "Block triggers autoblocks",
94 "type": "mwtinyint",
95 "options": {
96 "notnull": true,
97 "length": 1,
98 "default": 1
99 }
100 },
101 {
102 "name": "ipb_expiry",
103 "comment": "Time at which the block will expire. May be \"infinity\"",
104 "type": "mwtimestamp",
105 "options": {
106 "notnull": true,
107 "CustomSchemaOptions": {
108 "allowInfinite": true
109 }
110 }
111 },
112 {
113 "name": "ipb_range_start",
114 "comment": "Start of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
115 "type": "blob",
116 "options": {
117 "notnull": true,
118 "length": 255
119 }
120 },
121 {
122 "name": "ipb_range_end",
123 "comment": "End of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
124 "type": "blob",
125 "options": {
126 "notnull": true,
127 "length": 255
128 }
129 },
130 {
131 "name": "ipb_deleted",
132 "comment": "Flag for entries hidden from users and Sysops",
133 "type": "mwtinyint",
134 "options": {
135 "notnull": true,
136 "length": 1,
137 "default": 0
138 }
139 },
140 {
141 "name": "ipb_block_email",
142 "comment": "Block prevents user from accessing Special:Emailuser",
143 "type": "mwtinyint",
144 "options": {
145 "notnull": true,
146 "length": 1,
147 "default": 0
148 }
149 },
150 {
151 "name": "ipb_allow_usertalk",
152 "comment": "Block allows user to edit their own talk page",
153 "type": "mwtinyint",
154 "options": {
155 "notnull": true,
156 "length": 1,
157 "default": 0
158 }
159 },
160 {
161 "name": "ipb_parent_block_id",
162 "comment": "ID of the block that caused this block to exist. Autoblocks set this to the original block so that the original block being deleted also deletes the autoblocks",
163 "type": "integer",
164 "options": {
165 "notnull": false,
166 "default": null
167 }
168 },
169 {
170 "name": "ipb_sitewide",
171 "comment": "Block user from editing any page on the site (other than their own user talk page).",
172 "type": "mwtinyint",
173 "options": {
174 "notnull": true,
175 "length": 1,
176 "default": 1
177 }
178 }
179 ],
180 "indexes": [
181 {
182 "name": "ipb_address_unique",
183 "comment": "Unique index to support \"user already blocked\" messages. Any new options which prevent collisions should be included",
184 "columns": [
185 "ipb_address",
186 "ipb_user",
187 "ipb_auto"
188 ],
189 "unique": true,
190 "options": { "lengths": [ 255, null, null ] }
191 },
192 {
193 "name": "ipb_user",
194 "comment": "For querying whether a logged-in user is blocked",
195 "columns": [
196 "ipb_user"
197 ],
198 "unique": false
199 },
200 {
201 "name": "ipb_range",
202 "comment": "For querying whether an IP address is in any range",
203 "columns": [
204 "ipb_range_start",
205 "ipb_range_end"
206 ],
207 "unique": false,
208 "options": { "lengths": [ 8, 8 ] }
209 },
210 {
211 "name": "ipb_timestamp",
212 "comment": "Index for Special:BlockList",
213 "columns": [
214 "ipb_timestamp"
215 ],
216 "unique": false
217 },
218 {
219 "name": "ipb_expiry",
220 "comment": "Index for table pruning",
221 "columns": [
222 "ipb_expiry"
223 ],
224 "unique": false
225 },
226 {
227 "name": "ipb_parent_block_id",
228 "comment": "Index for removing autoblocks when a parent block is removed",
229 "columns": [
230 "ipb_parent_block_id"
231 ],
232 "unique": false
233 }
234 ],
235 "pk": [
236 "ipb_id"
237 ]
238 },
239 "after": {
240 "name": "ipblocks",
241 "comment": "Blocks against user accounts, IP addresses and IP ranges.",
242 "columns": [
243 {
244 "name": "ipb_id",
245 "comment": "Primary key, introduced for privacy.",
246 "type": "integer",
247 "options": {
248 "autoincrement": true,
249 "notnull": true,
250 "unsigned": true
251 }
252 },
253 {
254 "name": "ipb_address",
255 "comment": "Blocked IP address in dotted-quad form or user name.",
256 "type": "blob",
257 "options": {
258 "notnull": true,
259 "length": 255
260 }
261 },
262 {
263 "name": "ipb_user",
264 "comment": "Blocked user ID or 0 for IP blocks.",
265 "type": "integer",
266 "options": {
267 "unsigned": true,
268 "notnull": true,
269 "default": 0
270 }
271 },
272 {
273 "name": "ipb_by_actor",
274 "comment": "Actor who made the block.",
275 "type": "bigint",
276 "options": {
277 "unsigned": true,
278 "notnull": true
279 }
280 },
281 {
282 "name": "ipb_reason_id",
283 "comment": "Key to comment_id. Text comment made by blocker.",
284 "type": "bigint",
285 "options": {
286 "unsigned": true,
287 "notnull": true
288 }
289 },
290 {
291 "name": "ipb_timestamp",
292 "comment": "Creation (or refresh) date in standard YMDHMS form. IP blocks expire automatically.",
293 "type": "mwtimestamp",
294 "options": {
295 "notnull": true
296 }
297 },
298 {
299 "name": "ipb_auto",
300 "comment": "Indicates that the IP address was banned because a banned user accessed a page through it. If this is 1, ipb_address will be hidden, and the block identified by block ID number.",
301 "type": "mwtinyint",
302 "options": {
303 "notnull": true,
304 "length": 1,
305 "default": 0
306 }
307 },
308 {
309 "name": "ipb_anon_only",
310 "comment": "If set to 1, block applies only to logged-out users",
311 "type": "mwtinyint",
312 "options": {
313 "notnull": true,
314 "length": 1,
315 "default": 0
316 }
317 },
318 {
319 "name": "ipb_create_account",
320 "comment": "Block prevents account creation from matching IP addresses",
321 "type": "mwtinyint",
322 "options": {
323 "notnull": true,
324 "length": 1,
325 "default": 1
326 }
327 },
328 {
329 "name": "ipb_enable_autoblock",
330 "comment": "Block triggers autoblocks",
331 "type": "mwtinyint",
332 "options": {
333 "notnull": true,
334 "length": 1,
335 "default": 1
336 }
337 },
338 {
339 "name": "ipb_expiry",
340 "comment": "Time at which the block will expire. May be \"infinity\"",
341 "type": "mwtimestamp",
342 "options": {
343 "notnull": true,
344 "CustomSchemaOptions": {
345 "allowInfinite": true
346 }
347 }
348 },
349 {
350 "name": "ipb_range_start",
351 "comment": "Start of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
352 "type": "blob",
353 "options": {
354 "notnull": true,
355 "length": 255
356 }
357 },
358 {
359 "name": "ipb_range_end",
360 "comment": "End of an address range, in hexadecimal size chosen to allow IPv6. FIXME: this field were originally blank for single-IP blocks, but now it's populated. No migration was ever done. It should be fixed to be blank again for such blocks (T51504).",
361 "type": "blob",
362 "options": {
363 "notnull": true,
364 "length": 255
365 }
366 },
367 {
368 "name": "ipb_deleted",
369 "comment": "Flag for entries hidden from users and Sysops",
370 "type": "mwtinyint",
371 "options": {
372 "notnull": true,
373 "length": 1,
374 "default": 0
375 }
376 },
377 {
378 "name": "ipb_block_email",
379 "comment": "Block prevents user from accessing Special:Emailuser",
380 "type": "mwtinyint",
381 "options": {
382 "notnull": true,
383 "length": 1,
384 "default": 0
385 }
386 },
387 {
388 "name": "ipb_allow_usertalk",
389 "comment": "Block allows user to edit their own talk page",
390 "type": "mwtinyint",
391 "options": {
392 "notnull": true,
393 "length": 1,
394 "default": 0
395 }
396 },
397 {
398 "name": "ipb_parent_block_id",
399 "comment": "ID of the block that caused this block to exist. Autoblocks set this to the original block so that the original block being deleted also deletes the autoblocks",
400 "type": "integer",
401 "options": {
402 "notnull": false,
403 "unsigned": true,
404 "default": null
405 }
406 },
407 {
408 "name": "ipb_sitewide",
409 "comment": "Block user from editing any page on the site (other than their own user talk page).",
410 "type": "mwtinyint",
411 "options": {
412 "notnull": true,
413 "length": 1,
414 "default": 1
415 }
416 }
417 ],
418 "indexes": [
419 {
420 "name": "ipb_address_unique",
421 "comment": "Unique index to support \"user already blocked\" messages. Any new options which prevent collisions should be included",
422 "columns": [
423 "ipb_address",
424 "ipb_user",
425 "ipb_auto"
426 ],
427 "unique": true,
428 "options": { "lengths": [ 255, null, null ] }
429 },
430 {
431 "name": "ipb_user",
432 "comment": "For querying whether a logged-in user is blocked",
433 "columns": [
434 "ipb_user"
435 ],
436 "unique": false
437 },
438 {
439 "name": "ipb_range",
440 "comment": "For querying whether an IP address is in any range",
441 "columns": [
442 "ipb_range_start",
443 "ipb_range_end"
444 ],
445 "unique": false,
446 "options": { "lengths": [ 8, 8 ] }
447 },
448 {
449 "name": "ipb_timestamp",
450 "comment": "Index for Special:BlockList",
451 "columns": [
452 "ipb_timestamp"
453 ],
454 "unique": false
455 },
456 {
457 "name": "ipb_expiry",
458 "comment": "Index for table pruning",
459 "columns": [
460 "ipb_expiry"
461 ],
462 "unique": false
463 },
464 {
465 "name": "ipb_parent_block_id",
466 "comment": "Index for removing autoblocks when a parent block is removed",
467 "columns": [
468 "ipb_parent_block_id"
469 ],
470 "unique": false
471 }
472 ],
473 "pk": [
474 "ipb_id"
475 ]
476 }
477 }