1{
2	"comment": "Set unsigned true for rc_id in recentchanges table (T62962)",
3	"before": {
4		"name": "recentchanges",
5		"comment": "Primarily a summary table for Special:RecentChanges, this table contains some additional info on edits from the last few days",
6		"columns": [
7			{
8				"name": "rc_id",
9				"type": "integer",
10				"options": {
11					"autoincrement": true,
12					"notnull": true
13				}
14			},
15			{
16				"name": "rc_timestamp",
17				"type": "mwtimestamp",
18				"options": {
19					"notnull": true,
20					"length": 14
21				}
22			},
23			{
24				"name": "rc_actor",
25				"comment": "As in revision",
26				"type": "bigint",
27				"options": {
28					"unsigned": true,
29					"notnull": true
30				}
31			},
32			{
33				"name": "rc_namespace",
34				"comment": "When pages are renamed, their RC entries do _not_ change.",
35				"type": "integer",
36				"options": {
37					"notnull": true,
38					"default": 0
39				}
40			},
41			{
42				"name": "rc_title",
43				"type": "binary",
44				"options": {
45					"notnull": true,
46					"default": "",
47					"length": 255
48				}
49			},
50			{
51				"name": "rc_comment_id",
52				"comment": "as in revision...",
53				"type": "bigint",
54				"options": {
55					"unsigned": true,
56					"notnull": true
57				}
58			},
59			{
60				"name": "rc_minor",
61				"type": "mwtinyint",
62				"options": {
63					"unsigned": true,
64					"notnull": true,
65					"default": 0
66				}
67			},
68			{
69				"name": "rc_bot",
70				"comment": "Edits by user accounts with the 'bot' rights key are marked with a 1 here, and will be hidden from the default view.",
71				"type": "mwtinyint",
72				"options": {
73					"unsigned": true,
74					"notnull": true,
75					"default": 0
76				}
77			},
78			{
79				"name": "rc_new",
80				"comment": "Set if this change corresponds to a page creation",
81				"type": "mwtinyint",
82				"options": {
83					"unsigned": true,
84					"notnull": true,
85					"default": 0
86				}
87			},
88			{
89				"name": "rc_cur_id",
90				"comment": "Key to page_id (was cur_id prior to 1.5). This will keep links working after moves while retaining the at-the-time name in the changes list.",
91				"type": "integer",
92				"options": {
93					"unsigned": true,
94					"notnull": true,
95					"default": 0
96				}
97			},
98			{
99				"name": "rc_this_oldid",
100				"comment": "rev_id of the given revision",
101				"type": "integer",
102				"options": {
103					"unsigned": true,
104					"notnull": true,
105					"default": 0
106				}
107			},
108			{
109				"name": "rc_last_oldid",
110				"comment": "rev_id of the prior revision, for generating diff links.",
111				"type": "integer",
112				"options": {
113					"unsigned": true,
114					"notnull": true,
115					"default": 0
116				}
117			},
118			{
119				"name": "rc_type",
120				"comment": "The type of change entry (RC_EDIT,RC_NEW,RC_LOG,RC_EXTERNAL)",
121				"type": "mwtinyint",
122				"options": {
123					"unsigned": true,
124					"notnull": true,
125					"default": 0
126				}
127			},
128			{
129				"name": "rc_source",
130				"comment": "The source of the change entry (replaces rc_type) default of '' is temporary, needed for initial migration",
131				"type": "binary",
132				"options": {
133					"notnull": true,
134					"default": "",
135					"length": 16
136				}
137			},
138			{
139				"name": "rc_patrolled",
140				"comment": "If the Recent Changes Patrol option is enabled, users may mark edits as having been reviewed to remove a warning flag on the RC list. A value of 1 indicates the page has been reviewed.",
141				"type": "mwtinyint",
142				"options": {
143					"unsigned": true,
144					"notnull": true,
145					"default": 0
146				}
147			},
148			{
149				"name": "rc_ip",
150				"comment": "Recorded IP address the edit was made from, if the $wgPutIPinRC option is enabled.",
151				"type": "binary",
152				"options": {
153					"notnull": true,
154					"default": "",
155					"length": 40
156				}
157			},
158			{
159				"name": "rc_old_len",
160				"comment": "Text length in characters before the edit",
161				"type": "integer",
162				"options": {
163					"notnull": false
164				}
165			},
166			{
167				"name": "rc_new_len",
168				"comment": "Text length in characters after the edit",
169				"type": "integer",
170				"options": {
171					"notnull": false
172				}
173			},
174			{
175				"name": "rc_deleted",
176				"comment": "Visibility of recent changes items, bitfield",
177				"type": "mwtinyint",
178				"options": {
179					"unsigned": true,
180					"notnull": true,
181					"default": 0
182				}
183			},
184			{
185				"name": "rc_logid",
186				"comment": "Value corresponding to log_id, specific log entries",
187				"type": "integer",
188				"options": {
189					"unsigned": true,
190					"notnull": true,
191					"default": 0
192				}
193			},
194			{
195				"name": "rc_log_type",
196				"comment": "Store log type info here, or null",
197				"type": "binary",
198				"options": {
199					"notnull": false,
200					"default": null,
201					"length": 255
202				}
203			},
204			{
205				"name": "rc_log_action",
206				"comment": "Store log action or null",
207				"type": "binary",
208				"options": {
209					"notnull": false,
210					"default": null,
211					"length": 255
212				}
213			},
214			{
215				"name": "rc_params",
216				"comment": "Log params",
217				"type": "blob",
218				"options": {
219					"notnull": false,
220					"length": 65535
221				}
222			}
223		],
224		"indexes": [
225			{
226				"name": "rc_timestamp",
227				"comment": "Special:Recentchanges",
228				"columns": [
229					"rc_timestamp"
230				],
231				"unique": false
232			},
233			{
234				"name": "rc_namespace_title_timestamp",
235				"comment": "Special:Watchlist",
236				"columns": [
237					"rc_namespace",
238					"rc_title",
239					"rc_timestamp"
240				],
241				"unique": false
242			},
243			{
244				"name": "rc_cur_id",
245				"comment": "Special:Recentchangeslinked when finding changes in pages linked from a page",
246				"columns": [
247					"rc_cur_id"
248				],
249				"unique": false
250			},
251			{
252				"name": "new_name_timestamp",
253				"comment": "Special:Newpages",
254				"columns": [
255					"rc_new",
256					"rc_namespace",
257					"rc_timestamp"
258				],
259				"unique": false
260			},
261			{
262				"name": "rc_ip",
263				"comment": "Blank unless $wgPutIPinRC=true (false at WMF), possibly used by extensions, but mostly replaced by CheckUser.",
264				"columns": [
265					"rc_ip"
266				],
267				"unique": false
268			},
269			{
270				"name": "rc_ns_actor",
271				"comment": "Probably intended for Special:NewPages namespace filter",
272				"columns": [
273					"rc_namespace",
274					"rc_actor"
275				],
276				"unique": false
277			},
278			{
279				"name": "rc_actor",
280				"comment": "SiteStats active user count, Special:ActiveUsers, Special:NewPages user filter",
281				"columns": [
282					"rc_actor",
283					"rc_timestamp"
284				],
285				"unique": false
286			},
287			{
288				"name": "rc_name_type_patrolled_timestamp",
289				"comment": "ApiQueryRecentChanges (T140108)",
290				"columns": [
291					"rc_namespace",
292					"rc_type",
293					"rc_patrolled",
294					"rc_timestamp"
295				],
296				"unique": false
297			},
298			{
299				"name": "rc_this_oldid",
300				"comment": "Article.php and friends (T139012)",
301				"columns": [
302					"rc_this_oldid"
303				],
304				"unique": false
305			}
306		],
307		"pk": [
308			"rc_id"
309		]
310	},
311	"after": {
312		"name": "recentchanges",
313		"comment": "Primarily a summary table for Special:Recentchanges, this table contains some additional info on edits from the last few days, see Article::editUpdates()",
314		"columns": [
315			{
316				"name": "rc_id",
317				"type": "integer",
318				"options": {
319					"autoincrement": true,
320					"unsigned": true,
321					"notnull": true
322				}
323			},
324			{
325				"name": "rc_timestamp",
326				"type": "mwtimestamp",
327				"options": {
328					"notnull": true,
329					"length": 14
330				}
331			},
332			{
333				"name": "rc_actor",
334				"comment": "As in revision",
335				"type": "bigint",
336				"options": {
337					"unsigned": true,
338					"notnull": true
339				}
340			},
341			{
342				"name": "rc_namespace",
343				"comment": "When pages are renamed, their RC entries do _not_ change.",
344				"type": "integer",
345				"options": {
346					"notnull": true,
347					"default": 0
348				}
349			},
350			{
351				"name": "rc_title",
352				"type": "binary",
353				"options": {
354					"notnull": true,
355					"default": "",
356					"length": 255
357				}
358			},
359			{
360				"name": "rc_comment_id",
361				"comment": "as in revision...",
362				"type": "bigint",
363				"options": {
364					"unsigned": true,
365					"notnull": true
366				}
367			},
368			{
369				"name": "rc_minor",
370				"type": "mwtinyint",
371				"options": {
372					"unsigned": true,
373					"notnull": true,
374					"default": 0
375				}
376			},
377			{
378				"name": "rc_bot",
379				"comment": "Edits by user accounts with the 'bot' rights key are marked with a 1 here, and will be hidden from the default view.",
380				"type": "mwtinyint",
381				"options": {
382					"unsigned": true,
383					"notnull": true,
384					"default": 0
385				}
386			},
387			{
388				"name": "rc_new",
389				"comment": "Set if this change corresponds to a page creation",
390				"type": "mwtinyint",
391				"options": {
392					"unsigned": true,
393					"notnull": true,
394					"default": 0
395				}
396			},
397			{
398				"name": "rc_cur_id",
399				"comment": "Key to page_id (was cur_id prior to 1.5). This will keep links working after moves while retaining the at-the-time name in the changes list.",
400				"type": "integer",
401				"options": {
402					"unsigned": true,
403					"notnull": true,
404					"default": 0
405				}
406			},
407			{
408				"name": "rc_this_oldid",
409				"comment": "rev_id of the given revision",
410				"type": "integer",
411				"options": {
412					"unsigned": true,
413					"notnull": true,
414					"default": 0
415				}
416			},
417			{
418				"name": "rc_last_oldid",
419				"comment": "rev_id of the prior revision, for generating diff links.",
420				"type": "integer",
421				"options": {
422					"unsigned": true,
423					"notnull": true,
424					"default": 0
425				}
426			},
427			{
428				"name": "rc_type",
429				"comment": "The type of change entry (RC_EDIT,RC_NEW,RC_LOG,RC_EXTERNAL)",
430				"type": "mwtinyint",
431				"options": {
432					"unsigned": true,
433					"notnull": true,
434					"default": 0
435				}
436			},
437			{
438				"name": "rc_source",
439				"comment": "The source of the change entry (replaces rc_type) default of '' is temporary, needed for initial migration",
440				"type": "binary",
441				"options": {
442					"notnull": true,
443					"default": "",
444					"length": 16
445				}
446			},
447			{
448				"name": "rc_patrolled",
449				"comment": "If the Recent Changes Patrol option is enabled, users may mark edits as having been reviewed to remove a warning flag on the RC list. A value of 1 indicates the page has been reviewed.",
450				"type": "mwtinyint",
451				"options": {
452					"unsigned": true,
453					"notnull": true,
454					"default": 0
455				}
456			},
457			{
458				"name": "rc_ip",
459				"comment": "Recorded IP address the edit was made from, if the $wgPutIPinRC option is enabled.",
460				"type": "binary",
461				"options": {
462					"notnull": true,
463					"default": "",
464					"length": 40
465				}
466			},
467			{
468				"name": "rc_old_len",
469				"comment": "Text length in characters before the edit",
470				"type": "integer",
471				"options": {
472					"notnull": false
473				}
474			},
475			{
476				"name": "rc_new_len",
477				"comment": "Text length in characters after the edit",
478				"type": "integer",
479				"options": {
480					"notnull": false
481				}
482			},
483			{
484				"name": "rc_deleted",
485				"comment": "Visibility of recent changes items, bitfield",
486				"type": "mwtinyint",
487				"options": {
488					"unsigned": true,
489					"notnull": true,
490					"default": 0
491				}
492			},
493			{
494				"name": "rc_logid",
495				"comment": "Value corresponding to log_id, specific log entries",
496				"type": "integer",
497				"options": {
498					"unsigned": true,
499					"notnull": true,
500					"default": 0
501				}
502			},
503			{
504				"name": "rc_log_type",
505				"comment": "Store log type info here, or null",
506				"type": "binary",
507				"options": {
508					"notnull": false,
509					"default": null,
510					"length": 255
511				}
512			},
513			{
514				"name": "rc_log_action",
515				"comment": "Store log action or null",
516				"type": "binary",
517				"options": {
518					"notnull": false,
519					"default": null,
520					"length": 255
521				}
522			},
523			{
524				"name": "rc_params",
525				"comment": "Log params",
526				"type": "blob",
527				"options": {
528					"notnull": false,
529					"length": 65535
530				}
531			}
532		],
533		"indexes": [
534			{
535				"name": "rc_timestamp",
536				"comment": "Special:Recentchanges",
537				"columns": [
538					"rc_timestamp"
539				],
540				"unique": false
541			},
542			{
543				"name": "rc_namespace_title_timestamp",
544				"comment": "Special:Watchlist",
545				"columns": [
546					"rc_namespace",
547					"rc_title",
548					"rc_timestamp"
549				],
550				"unique": false
551			},
552			{
553				"name": "rc_cur_id",
554				"comment": "Special:Recentchangeslinked when finding changes in pages linked from a page",
555				"columns": [
556					"rc_cur_id"
557				],
558				"unique": false
559			},
560			{
561				"name": "new_name_timestamp",
562				"comment": "Special:Newpages",
563				"columns": [
564					"rc_new",
565					"rc_namespace",
566					"rc_timestamp"
567				],
568				"unique": false
569			},
570			{
571				"name": "rc_ip",
572				"comment": "Blank unless $wgPutIPinRC=true (false at WMF), possibly used by extensions, but mostly replaced by CheckUser.",
573				"columns": [
574					"rc_ip"
575				],
576				"unique": false
577			},
578			{
579				"name": "rc_ns_actor",
580				"comment": "Probably intended for Special:NewPages namespace filter",
581				"columns": [
582					"rc_namespace",
583					"rc_actor"
584				],
585				"unique": false
586			},
587			{
588				"name": "rc_actor",
589				"comment": "SiteStats active user count, Special:ActiveUsers, Special:NewPages user filter",
590				"columns": [
591					"rc_actor",
592					"rc_timestamp"
593				],
594				"unique": false
595			},
596			{
597				"name": "rc_name_type_patrolled_timestamp",
598				"comment": "ApiQueryRecentChanges (T140108)",
599				"columns": [
600					"rc_namespace",
601					"rc_type",
602					"rc_patrolled",
603					"rc_timestamp"
604				],
605				"unique": false
606			},
607			{
608				"name": "rc_this_oldid",
609				"comment": "Article.php and friends (T139012)",
610				"columns": [
611					"rc_this_oldid"
612				],
613				"unique": false
614			}
615		],
616		"pk": [
617			"rc_id"
618		]
619	}
620}
621