1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
|
[
{
"name": "site_identifiers",
"comment": "Links local site identifiers to their corresponding site.",
"columns": [
{
"name": "si_type",
"comment": "local key type, ie 'interwiki' or 'langlink'",
"type": "binary",
"options": { "length": 32, "notnull": true }
},
{
"name": "si_key",
"comment": "local key value, ie 'en' or 'wiktionary'",
"type": "binary",
"options": { "length": 32, "notnull": true }
},
{
"name": "si_site",
"comment": "Key on sites.site_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
}
],
"indexes": [
{ "name": "si_site", "columns": [ "si_site" ], "unique": false },
{ "name": "si_key", "columns": [ "si_key" ], "unique": false }
],
"pk": [ "si_type", "si_key" ]
},
{
"name": "updatelog",
"comment": "A table to log updates, one text key row per update.",
"columns": [
{
"name": "ul_key",
"type": "string",
"options": { "length": 255, "notnull": true }
},
{
"name": "ul_value",
"type": "blob",
"options": { "length": 65530, "notnull": false }
}
],
"indexes": [],
"pk": [ "ul_key" ]
},
{
"name": "actor",
"comment": "The \"actor\" table associates user names or IP addresses with integers for the benefit of other tables that need to refer to either logged-in or logged-out users. If something can only ever be done by logged-in users, it can refer to the user table directly.",
"columns": [
{
"name": "actor_id",
"comment": "Unique ID to identify each actor",
"type": "bigint",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "actor_user",
"comment": "Key to user.user_id, or NULL for anonymous edits",
"type": "integer",
"options": { "unsigned": true, "notnull": false }
},
{
"name": "actor_name",
"comment": "Text username or IP address",
"type": "binary",
"options": { "length": 255, "notnull": true }
}
],
"indexes": [
{ "name": "actor_user", "columns": [ "actor_user" ], "unique": true },
{ "name": "actor_name", "columns": [ "actor_name" ], "unique": true }
],
"pk": [ "actor_id" ]
},
{
"name": "user_former_groups",
"comment": "Stores the groups the user has once belonged to. The user may still belong to these groups (check user_groups). Autopromotion of users to groups from which they were removed can be restricted by using wgAutopromoteOnce instead of wgAutopromote.",
"columns": [
{
"name": "ufg_user",
"comment": "Key to user_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "default": 0 }
},
{
"name": "ufg_group",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
}
],
"indexes": [],
"pk": [ "ufg_user", "ufg_group" ]
},
{
"name": "bot_passwords",
"comment": "This table contains a user's bot passwords: passwords that allow access to the account via the API with limited rights.",
"columns": [
{
"name": "bp_user",
"comment": "User ID obtained from CentralIdLookup.",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "bp_app_id",
"comment": "Application identifier.",
"type": "binary",
"options": { "length": 32, "notnull": true }
},
{
"name": "bp_password",
"comment": "Password hashes, like user.user_password.",
"type": "blob",
"options": { "length": 255, "notnull": true }
},
{
"name": "bp_token",
"comment": "Like user.user_token",
"type": "binary",
"options": { "length": 32, "notnull": true, "default": "", "fixed": true }
},
{
"name": "bp_restrictions",
"comment": "JSON blob for MWRestrictions",
"type": "blob",
"options": { "length": 65535, "notnull": true }
},
{
"name": "bp_grants",
"comment": "Grants allowed to the account when authenticated with this bot-password",
"type": "blob",
"options": { "length": 65535, "notnull": true }
}
],
"indexes": [],
"pk": [ "bp_user", "bp_app_id" ]
},
{
"name": "comment",
"comment": "Edits, blocks, and other actions typically have a textual comment describing the action. They are stored here to reduce the size of the main tables, and to allow for deduplication. Deduplication is currently best-effort to avoid locking on inserts that would be required for strict deduplication. There MAY be multiple rows with the same comment_text and comment_data.",
"columns": [
{
"name": "comment_id",
"comment": "Unique ID to identify each comment",
"type": "bigint",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "comment_hash",
"comment": "Hash of comment_text and comment_data, for deduplication",
"type": "integer",
"options": { "notnull": true }
},
{
"name": "comment_text",
"comment": "Text comment summarizing the change. This text is shown in the history and other changes lists, rendered in a subset of wiki markup by MediaWiki\\CommentFormatter\\CommentFormatter::format(). Size limits are enforced at the application level, and should take care to crop UTF-8 strings appropriately.",
"type": "blob",
"options": { "length": 65535, "notnull": true }
},
{
"name": "comment_data",
"comment": "JSON data, intended for localizing auto-generated comments. This holds structured data that is intended to be used to provide localized versions of automatically-generated comments. When not empty, comment_text should be the generated comment localized using the wiki's content language.",
"type": "blob",
"options": { "length": 65535, "notnull": false }
}
],
"indexes": [
{ "name": "comment_hash", "columns": [ "comment_hash" ], "unique": false }
],
"pk": [ "comment_id" ]
},
{
"name": "slots",
"comment": "Slots represent an n:m relation between revisions and content objects. A content object can have a specific \"role\" in one or more revisions. Each revision can have multiple content objects, each having a different role.",
"columns": [
{
"name": "slot_revision_id",
"comment": "reference to rev_id or ar_rev_id",
"type": "bigint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "slot_role_id",
"comment": "reference to role_id",
"type": "smallint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "slot_content_id",
"comment": "reference to content_id",
"type": "bigint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "slot_origin",
"comment": "The revision ID of the revision that originated the slot's content. To find revisions that changed slots, look for slot_origin = slot_revision_id. TODO: Is that actually true? Rollback seems to violate it by setting slot_origin to an older rev_id. Undeletions could result in the same situation.",
"type": "bigint",
"options": { "unsigned": true, "notnull": true }
}
],
"indexes": [
{
"name": "slot_revision_origin_role",
"columns": [ "slot_revision_id", "slot_origin", "slot_role_id" ],
"comment": "Index for finding revisions that modified a specific slot",
"unique": false
}
],
"pk": [ "slot_revision_id", "slot_role_id" ]
},
{
"name": "site_stats",
"comment": "Contains a single row with some aggregate info on the state of the site.",
"columns": [
{
"name": "ss_row_id",
"comment": "The single row should contain 1 here.",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "ss_total_edits",
"comment": "Total number of edits performed.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_good_articles",
"comment": "See SiteStatsInit::articles().",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_total_pages",
"comment": "Total pages, theoretically equal to SELECT COUNT(*) FROM page.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_users",
"comment": "Number of users, theoretically equal to SELECT COUNT(*) FROM user.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_active_users",
"comment": "Number of users that still edit.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ss_images",
"comment": "Number of images, equivalent to SELECT COUNT(*) FROM image.",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
}
],
"indexes": [],
"pk": [ "ss_row_id" ]
},
{
"name": "user_properties",
"comment": "User preferences and perhaps other fun stuff. :) Replaces the old user.user_options blob, with a couple nice properties: 1) We only store non-default settings, so changes to the defaults are now reflected for everybody, not just new accounts. 2) We can more easily do bulk lookups, statistics, or modifications of saved options since it's a sensible table structure.",
"columns": [
{
"name": "up_user",
"comment": "Foreign key to user.user_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "up_property",
"comment": "Name of the option being saved. This is indexed for bulk lookup.",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "up_value",
"comment": "Property value as a string.",
"type": "blob",
"options": { "length": 65530, "notnull": false }
}
],
"indexes": [
{ "name": "up_property", "columns": [ "up_property" ], "unique": false }
],
"pk": [ "up_user", "up_property" ]
},
{
"name": "log_search",
"columns": [
{
"name": "ls_field",
"comment": "The type of ID (rev ID, log ID, rev timestamp, username)",
"type": "binary",
"options": { "length": 32, "notnull": true }
},
{
"name": "ls_value",
"comment": "The value of the ID",
"type": "string",
"options": { "length": 255, "notnull": true }
},
{
"name": "ls_log_id",
"comment": "Key to log_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "default": 0 }
}
],
"indexes": [
{ "name": "ls_log_id", "columns": [ "ls_log_id" ], "unique": false }
],
"pk": [ "ls_field", "ls_value", "ls_log_id" ]
},
{
"name": "change_tag",
"comment": "A table to track tags for revisions, logs and recent changes",
"columns": [
{
"name": "ct_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "ct_rc_id",
"comment": "RCID for the change",
"type": "bigint",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ct_log_id",
"comment": "LOGID for the change",
"type": "integer",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ct_rev_id",
"comment": "REVID for the change",
"type": "integer",
"options": { "unsigned": true, "notnull": false, "default": null }
},
{
"name": "ct_params",
"comment": "Parameters for the tag; used by some extensions",
"type": "blob",
"options": { "length": 65530, "notnull": false, "default": null }
},
{
"name": "ct_tag_id",
"comment": "Foreign key to change_tag_def row",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
}
],
"indexes": [
{ "name": "ct_rc_tag_id", "columns": [ "ct_rc_id", "ct_tag_id" ], "unique": true },
{ "name": "ct_log_tag_id", "columns": [ "ct_log_id", "ct_tag_id" ], "unique": true },
{ "name": "ct_rev_tag_id", "columns": [ "ct_rev_id", "ct_tag_id" ], "unique": true },
{
"name": "ct_tag_id_id",
"comment": "Covering index, so we can pull all the info only out of the index.",
"columns": [ "ct_tag_id", "ct_rc_id", "ct_rev_id", "ct_log_id" ],
"unique": false
}
],
"pk": [ "ct_id" ]
},
{
"name": "content",
"comment": "The content table represents content objects. It's primary purpose is to provide the necessary meta-data for loading and interpreting a serialized data blob to create a content object.",
"columns": [
{
"name": "content_id",
"comment": "ID of the content object",
"type": "bigint",
"options": { "notnull": true, "unsigned": true, "autoincrement": true }
},
{
"name": "content_size",
"comment": "Nominal size of the content object (not necessarily of the serialized blob)",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "content_sha1",
"comment": "Nominal hash of the content object (not necessarily of the serialized blob)",
"type": "binary",
"options": { "notnull": true, "length": 32 }
},
{
"name": "content_model",
"comment": "reference to model_id. Note the content format isn't specified; it should be assumed to be in the default format for the model unless auto-detected otherwise.",
"type": "smallint",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "content_address",
"comment": "URL-like address of the content blob",
"type": "binary",
"options": { "notnull": true, "length": 255 }
}
],
"indexes": [],
"pk": [ "content_id" ]
},
{
"name": "l10n_cache",
"comment": "Table for storing localisation data",
"columns": [
{
"name": "lc_lang",
"comment": "Language code",
"type": "binary",
"options": { "notnull": true, "length": 35 }
},
{
"name": "lc_key",
"comment": "Cache key",
"type": "string",
"options": { "notnull": true, "length": 255 }
},
{
"name": "lc_value",
"comment": "Value",
"type": "blob",
"options": { "notnull": true, "length": 16777215 }
}
],
"indexes": [],
"pk": [ "lc_lang", "lc_key" ]
},
{
"name": "redirect",
"comment": "For each redirect, this table contains exactly one row defining its target.\nRedirect targets are key to page_namespace/page_title of the target page.\nThe target page may or may not exist, and due to renames\nand deletions may refer to different page records as time\ngoes by.",
"columns": [
{
"name": "rd_from",
"comment": "Key to the page_id of the redirect page",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "rd_namespace",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "rd_title",
"type": "binary",
"options": { "notnull": true, "length": 255, "default": "" }
},
{
"name": "rd_interwiki",
"type": "string",
"options": { "notnull": false, "length": 32, "default": null },
"comment": "After T346290 all values have been computed and this field is never null. TODO: Mark as not null (T348029)."
},
{
"name": "rd_fragment",
"type": "binary",
"options": { "notnull": false, "length": 255, "default": null },
"comment": "After T346290 all values have been computed and this field is never null. TODO: Mark as not null (T348029)."
}
],
"indexes": [
{ "name": "rd_ns_title", "columns": [ "rd_namespace", "rd_title", "rd_from" ], "unique": false }
],
"pk": [ "rd_from" ]
},
{
"name": "pagelinks",
"comment": "Track page-to-page hyperlinks within the wiki. The target page may or may not exist, and due to renames and deletions may refer to different page records as time goes by.",
"columns": [
{
"name": "pl_from",
"comment": "Key to the page_id of the page containing the link.",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "pl_from_namespace",
"type": "integer",
"comment": "Namespace for pl_from page",
"options": { "notnull": true, "default": 0 }
},
{
"name": "pl_target_id",
"type": "bigint",
"comment": "Foreign key to linktarget.lt_id",
"options": { "notnull": false, "unsigned": true }
}
],
"indexes": [
{
"name": "pl_target_id",
"columns": [ "pl_target_id", "pl_from" ],
"comment": "Reverse index, for Special:Whatlinkshere",
"unique": false
},
{
"name": "pl_backlinks_namespace_target_id",
"columns": [ "pl_from_namespace", "pl_target_id", "pl_from" ],
"comment": "Index for Special:Whatlinkshere with namespace filter",
"unique": false
}
],
"pk": [ "pl_from", "pl_target_id" ]
},
{
"name": "templatelinks",
"comment": "Track template inclusions. The target page may or may not exist, and due to renames and deletions may refer to different page records as time goes by.",
"columns": [
{
"name": "tl_from",
"comment": "Key to the page_id of the page containing the link.",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "tl_from_namespace",
"type": "integer",
"comment": "Namespace for this page",
"options": { "notnull": true, "default": 0 }
},
{
"name": "tl_target_id",
"type": "bigint",
"comment": "Foreign key to linktarget.lt_id",
"options": { "notnull": true, "unsigned": true }
}
],
"indexes": [
{
"name": "tl_target_id",
"columns": [ "tl_target_id", "tl_from" ],
"comment": "Reverse index, for Special:Whatlinkshere",
"unique": false
},
{
"name": "tl_backlinks_namespace_target_id",
"columns": [ "tl_from_namespace", "tl_target_id", "tl_from" ],
"comment": "Index for Special:Whatlinkshere with namespace filter",
"unique": false
}
],
"pk": [ "tl_from", "tl_target_id" ]
},
{
"name": "imagelinks",
"comment": "Track links to images *used inline* We don't distinguish live from broken links here, so they do not need to be changed on upload/removal.",
"columns": [
{
"name": "il_from",
"comment": "Key to page_id of the page containing the image / media link.",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "il_from_namespace",
"type": "integer",
"comment": "Namespace for this page",
"options": { "notnull": true, "default": 0 }
},
{
"name": "il_to",
"type": "binary",
"comment": "Filename of target image. This is also the page_title of the file's description page; all such pages are in namespace 6 (NS_FILE).",
"options": { "notnull": true, "length": 255, "default": "" }
}
],
"indexes": [
{
"name": "il_to",
"columns": [ "il_to", "il_from" ],
"comment": "Reverse index, for Special:Whatlinkshere and file description page local usage",
"unique": false
},
{
"name": "il_backlinks_namespace",
"columns": [ "il_from_namespace", "il_to", "il_from" ],
"comment": "Index for Special:Whatlinkshere with namespace filter",
"unique": false
}
],
"pk": [ "il_from", "il_to" ]
},
{
"name": "langlinks",
"comment": "Track interlanguage links.",
"columns": [
{
"name": "ll_from",
"comment": "page_id of the referring page",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "ll_lang",
"type": "binary",
"comment": "Language code of the target",
"options": { "notnull": true, "length": 35, "default": "" }
},
{
"name": "ll_title",
"type": "binary",
"comment": "Title of the target, including namespace",
"options": { "notnull": true, "length": 255, "default": "" }
}
],
"indexes": [
{
"name": "ll_lang",
"columns": [ "ll_lang", "ll_title" ],
"comment": "Index for ApiQueryLangbacklinks",
"unique": false
}
],
"pk": [ "ll_from", "ll_lang" ]
},
{
"name": "iwlinks",
"comment": "Track inline interwiki links",
"columns": [
{
"name": "iwl_from",
"comment": "page_id of the referring page",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "iwl_prefix",
"type": "binary",
"comment": "Interwiki prefix code of the target",
"options": { "notnull": true, "length": 32, "default": "" }
},
{
"name": "iwl_title",
"type": "binary",
"comment": "Title of the target, including namespace",
"options": { "notnull": true, "length": 255, "default": "" }
}
],
"indexes": [
{
"name": "iwl_prefix_title_from",
"columns": [ "iwl_prefix", "iwl_title", "iwl_from" ],
"comment": "Index for ApiQueryIWBacklinks",
"unique": false
}
],
"pk": [ "iwl_from", "iwl_prefix", "iwl_title" ]
},
{
"name": "category",
"comment": "Track all existing categories. Something is a category if 1) it has an entry somewhere in categorylinks, or 2) it has a description page. Categories might not have corresponding pages, so they need to be tracked separately. The numbers of member pages (including categories and media), subcategories, and Image: namespace members, respectively are included in this table too. These are signed to make underflow more obvious. We make the first number include the second two for better sorting: subtracting for display is easy, adding for ordering is not.",
"columns": [
{
"name": "cat_id",
"comment": "Primary key",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "autoincrement": true }
},
{
"name": "cat_title",
"type": "binary",
"comment": "Name of the category, in the same form as page_title (with underscores). If there is a category page corresponding to this category, by definition, it has this name (in the Category namespace).",
"options": { "notnull": true, "length": 255 }
},
{
"name": "cat_pages",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "cat_subcats",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "cat_files",
"type": "integer",
"options": { "notnull": true, "default": 0 }
}
],
"indexes": [
{
"name": "cat_title",
"columns": [ "cat_title" ],
"unique": true
},
{
"name": "cat_pages",
"columns": [ "cat_pages" ],
"comment": "For Special:Mostlinkedcategories",
"unique": false
}
],
"pk": [ "cat_id" ]
},
{
"name": "watchlist_expiry",
"comment": "Allows setting an expiry for watchlist items.",
"columns": [
{
"name": "we_item",
"comment": "Key to watchlist.wl_id",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "we_expiry",
"type": "mwtimestamp",
"comment": "Expiry time",
"options": { "notnull": true }
}
],
"indexes": [
{
"name": "we_expiry",
"columns": [ "we_expiry" ],
"unique": false
}
],
"pk": [ "we_item" ]
},
{
"name": "change_tag_def",
"comment": "Table defining tag names for IDs. Also stores hit counts to avoid expensive queries on change_tag",
"columns": [
{
"name": "ctd_id",
"comment": "Numerical ID of the tag (ct_tag_id refers to this)",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "ctd_name",
"comment": "Symbolic name of the tag (what would previously be put in ct_tag)",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "ctd_user_defined",
"comment": "Whether this tag was defined manually by a privileged user using Special:Tags",
"type": "mwtinyint",
"options": { "notnull": true, "length": 1 }
},
{
"name": "ctd_count",
"comment": "Number of times this tag was used",
"type": "bigint",
"options": { "unsigned": true, "notnull": true, "default": 0 }
}
],
"indexes": [
{ "name": "ctd_name", "columns": [ "ctd_name" ], "unique": true },
{ "name": "ctd_count", "columns": [ "ctd_count" ], "unique": false },
{ "name": "ctd_user_defined", "columns": [ "ctd_user_defined" ], "unique": false }
],
"pk": [ "ctd_id" ]
},
{
"name": "ipblocks_restrictions",
"comment": "Partial Block Restrictions",
"columns": [
{
"name": "ir_ipb_id",
"comment": "The bl_id from block",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "ir_type",
"comment": "The restriction type id.",
"type": "mwtinyint",
"options": { "notnull": true, "length": 4 }
},
{
"name": "ir_value",
"comment": "The restriction id that corresponds to the type: page ID, namespace ID or BlockActionInfo ID.",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
}
],
"indexes": [
{
"name": "ir_type_value",
"comment": "Index to query restrictions by the page or namespace.",
"columns": [ "ir_type", "ir_value" ],
"unique": false
}
],
"pk": [ "ir_ipb_id", "ir_type", "ir_value" ]
},
{
"name": "querycache",
"comment": "Used for caching expensive grouped queries",
"columns": [
{
"name": "qc_type",
"comment": "A key name, generally the base name of the special page",
"type": "binary",
"options": { "length": 32, "notnull": true }
},
{
"name": "qc_value",
"comment": "Some sort of stored value. Sizes, counts...",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "qc_namespace",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "qc_title",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
}
],
"indexes": [
{ "name": "qc_type", "columns": [ "qc_type", "qc_value" ], "unique": false }
],
"pk": []
},
{
"name": "querycachetwo",
"comment": "Used for caching expensive grouped queries that need two links (for example double-redirects)",
"columns": [
{
"name": "qcc_type",
"comment": "A key name, generally the base name of the special page.",
"type": "binary",
"options": { "length": 32, "notnull": true }
},
{
"name": "qcc_value",
"comment": "Some sort of stored value. Sizes, counts...",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "qcc_namespace",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "qcc_title",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
},
{
"name": "qcc_namespacetwo",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "qcc_titletwo",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
}
],
"indexes": [
{ "name": "qcc_type", "columns": [ "qcc_type", "qcc_value" ], "unique": false },
{ "name": "qcc_title", "columns": [ "qcc_type", "qcc_namespace", "qcc_title" ], "unique": false },
{ "name": "qcc_titletwo", "columns": [ "qcc_type", "qcc_namespacetwo", "qcc_titletwo" ], "unique": false }
],
"pk": []
},
{
"name": "page_restrictions",
"comment": "Used for storing page restrictions (i.e. protection levels)",
"columns": [
{
"name": "pr_id",
"comment": "Field for an ID for this restrictions row (sort-key for Special:ProtectedPages)",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "pr_page",
"comment": "Page to apply restrictions to (Foreign Key to page).",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "pr_type",
"comment": "The protection type (edit, move, etc)",
"type": "binary",
"options": { "length": 60, "notnull": true }
},
{
"name": "pr_level",
"comment": "The protection level (Sysop, autoconfirmed, etc)",
"type": "binary",
"options": { "length": 60, "notnull": true }
},
{
"name": "pr_cascade",
"type": "mwtinyint",
"options": { "notnull": true }
},
{
"name": "pr_expiry",
"comment": "Field for time-limited protection.",
"type": "mwtimestamp",
"options": {
"notnull": false,
"CustomSchemaOptions": {
"allowInfinite": true
}
}
}
],
"indexes": [
{ "name": "pr_pagetype", "columns": [ "pr_page", "pr_type" ], "unique": true },
{ "name": "pr_typelevel", "columns": [ "pr_type", "pr_level" ], "unique": false },
{ "name": "pr_level", "columns": [ "pr_level" ], "unique": false },
{ "name": "pr_cascade", "columns": [ "pr_cascade" ], "unique": false }
],
"pk": [ "pr_id" ]
},
{
"name": "user_groups",
"comment": "User permissions have been broken out to a separate table; this allows sites with a shared user table to have different permissions assigned to a user in each project. This table replaces the old user_rights field which used a comma-separated blob.",
"columns": [
{
"name": "ug_user",
"comment": "Key to user_id",
"type": "integer",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "ug_group",
"comment": "Group names are short symbolic string keys. The set of group names is open-ended, though in practice only some predefined ones are likely to be used. At runtime $wgGroupPermissions will associate group keys with particular permissions. A user will have the combined permissions of any group they're explicitly in, plus the implicit '*' and 'user' groups.",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
},
{
"name": "ug_expiry",
"comment": "Time at which the user group membership will expire. Set to NULL for a non-expiring (infinite) membership.",
"type": "mwtimestamp",
"options": {
"notnull": false,
"default": null,
"CustomSchemaOptions": {
"allowInfinite": true
}
}
}
],
"indexes": [
{ "name": "ug_group", "columns": [ "ug_group" ], "unique": false },
{ "name": "ug_expiry", "columns": [ "ug_expiry" ], "unique": false }
],
"pk": [ "ug_user", "ug_group" ]
},
{
"name": "querycache_info",
"comment": "Details of updates to cached special pages",
"columns": [
{
"name": "qci_type",
"comment": "Special page name. Corresponds to a qc_type value",
"type": "binary",
"options": { "length": 32, "notnull": true, "default": "" }
},
{
"name": "qci_timestamp",
"comment": "Timestamp of last update",
"type": "mwtimestamp",
"options": { "notnull": true, "default": "19700101000000" }
}
],
"indexes": [],
"pk": [ "qci_type" ]
},
{
"name": "watchlist",
"columns": [
{
"name": "wl_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "wl_user",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "wl_namespace",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "wl_title",
"type": "binary",
"options": { "length": 255, "notnull": true, "default": "" }
},
{
"name": "wl_notificationtimestamp",
"comment": "Timestamp used to send notification e-mails and show 'updated since last visit' markers. Set to NULL when the user visits the latest revision of the page, which means that they should be sent an e-mail on the next change.",
"type": "mwtimestamp",
"options": { "notnull": false }
}
],
"indexes": [
{
"name": "wl_user",
"columns": [ "wl_user", "wl_namespace", "wl_title" ],
"comment": "Special:Watchlist",
"unique": true
},
{
"name": "wl_namespace_title",
"columns": [ "wl_namespace", "wl_title" ],
"comment": "Special:Movepage (WatchedItemStore::duplicateEntry)",
"unique": false
},
{
"name": "wl_user_notificationtimestamp",
"columns": [ "wl_user", "wl_notificationtimestamp" ],
"comment": "ApiQueryWatchlistRaw changed filter",
"unique": false
}
],
"pk": [ "wl_id" ]
},
{
"name": "sites",
"comment": "Holds all the sites known to the wiki.",
"columns": [
{
"name": "site_id",
"type": "integer",
"comment": "Numeric id of the site",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "site_global_key",
"type": "binary",
"comment": "Global identifier for the site, ie 'enwiktionary'",
"options": { "notnull": true, "length": 64 }
},
{
"name": "site_type",
"type": "binary",
"comment": "Type of the site, ie 'mediawiki'",
"options": { "notnull": true, "length": 32 }
},
{
"name": "site_group",
"type": "binary",
"comment": "Group of the site, ie 'wikipedia'",
"options": { "notnull": true, "length": 32 }
},
{
"name": "site_source",
"type": "binary",
"comment": "Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'",
"options": { "notnull": true, "length": 32 }
},
{
"name": "site_language",
"type": "binary",
"comment": "Language code of the sites primary language.",
"options": { "notnull": true, "length": 35 }
},
{
"name": "site_protocol",
"type": "binary",
"comment": "Protocol of the site, ie 'http://', 'irc://', '//'. This field is an index for lookups and is build from type specific data in site_data.",
"options": { "notnull": true, "length": 32 }
},
{
"name": "site_domain",
"type": "string",
"comment": "Domain of the site in reverse order, ie 'org.mediawiki.www.'. This field is an index for lookups and is build from type specific data in site_data.",
"options": { "notnull": true, "length": 255 }
},
{
"name": "site_data",
"type": "blob",
"comment": "Type dependent site data.",
"options": { "notnull": true, "length": 65530 }
},
{
"name": "site_forward",
"type": "mwtinyint",
"comment": "If site.tld/path/key:pageTitle should forward users to the page on the actual site, where \"key\" is the local identifier.",
"options": { "notnull": true, "length": 1 }
},
{
"name": "site_config",
"type": "blob",
"comment": "Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki.",
"options": { "notnull": true, "length": 65530 }
}
],
"indexes": [
{ "name": "site_global_key", "columns": [ "site_global_key" ], "unique": true }
],
"pk": [ "site_id" ]
},
{
"name": "user_newtalk",
"comment": "Stores notifications of user talk page changes, for the display of the 'you have new messages' box",
"columns": [
{
"name": "user_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "default": 0 }
},
{
"name": "user_ip",
"comment": "If the user is an anonymous user their IP address is stored here since the user_id of 0 is ambiguous",
"type": "binary",
"options": { "length": 40, "notnull": true, "default": "" }
},
{
"name": "user_last_timestamp",
"comment": "The highest timestamp of revisions of the talk page viewed by this user",
"type": "mwtimestamp",
"options": { "notnull": false }
}
],
"indexes": [
{ "name": "un_user_id", "columns": [ "user_id" ], "unique": false },
{ "name": "un_user_ip", "columns": [ "user_ip" ], "unique": false }
],
"pk": []
},
{
"name": "interwiki",
"comment": "Recognized interwiki link prefixes",
"columns": [
{
"name": "iw_prefix",
"type": "string",
"comment": "The interwiki prefix, (e.g. \"Meatball\", or the language prefix \"de\")",
"options": { "length": 32, "notnull": true }
},
{
"name": "iw_url",
"type": "blob",
"comment": "The URL of the wiki, with \"$1\" as a placeholder for an article name. Any spaces in the name will be transformed to underscores before insertion.",
"options": { "notnull": true, "length": 65530 }
},
{
"name": "iw_api",
"type": "blob",
"comment": "The URL of the file api.php",
"options": { "notnull": true, "length": 65530 }
},
{
"name": "iw_wikiid",
"type": "string",
"comment": "The name of the database (for a connection to be established with LBFactory::getMainLB( 'wikiid' ))",
"options": { "notnull": true, "length": 64 }
},
{
"name": "iw_local",
"type": "mwtinyint",
"comment": "A boolean value indicating whether the wiki is in this project (used, for example, to detect redirect loops)",
"options": { "notnull": true, "length": 1 }
},
{
"name": "iw_trans",
"type": "mwtinyint",
"comment": "Boolean value indicating whether interwiki transclusions are allowed.",
"options": { "notnull": true, "default": 0 }
}
],
"indexes": [],
"pk": [ "iw_prefix" ]
},
{
"name": "protected_titles",
"comment": "Used for storing nonexistent pages that have been protected",
"columns": [
{
"name": "pt_namespace",
"type": "integer",
"options": { "notnull": true }
},
{
"name": "pt_title",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "pt_user",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "pt_reason_id",
"type": "bigint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "pt_timestamp",
"type": "mwtimestamp",
"options": { "notnull": true }
},
{
"name": "pt_expiry",
"type": "mwtimestamp",
"options": {
"notnull": true,
"CustomSchemaOptions": {
"allowInfinite": true
}
}
},
{
"name": "pt_create_perm",
"type": "binary",
"options": { "length": 60, "notnull": true }
}
],
"indexes": [ { "name": "pt_timestamp", "columns": [ "pt_timestamp" ], "unique": false } ],
"pk": [ "pt_namespace", "pt_title" ]
},
{
"name": "externallinks",
"comment": "Track links to external URLs",
"columns": [
{
"name": "el_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "el_from",
"type": "integer",
"comment": "page_id of the referring page",
"options": { "unsigned": true, "notnull": true, "default": 0 }
},
{
"name": "el_to_domain_index",
"type": "binary",
"comment": "Indexable domain",
"options": { "notnull": true, "length": 255, "default": "" }
},
{
"name": "el_to_path",
"type": "blob",
"comment": "Path to the external link without considering the domain",
"options": { "length": 65530, "notnull": false }
}
],
"indexes": [
{ "name": "el_from", "columns": [ "el_from" ], "unique": false },
{ "name": "el_to_domain_index_to_path", "columns": [ "el_to_domain_index", "el_to_path" ], "unique": false, "options": { "lengths": [ null, 60 ] } }
],
"pk": [ "el_id" ]
},
{
"name": "ip_changes",
"comment": "Every time an edit by a logged out user is saved, a row is created in ip_changes. This stores the IP as a hex representation so that we can more easily find edits within an IP range.",
"columns": [
{
"name": "ipc_rev_id",
"comment": "Foreign key to the revision table, also serves as the unique primary key",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "default": 0 }
},
{
"name": "ipc_rev_timestamp",
"comment": "The timestamp of the revision",
"type": "mwtimestamp",
"options": { "notnull": true }
},
{
"name": "ipc_hex",
"comment": "Hex representation of the IP address, as returned by Wikimedia\\IPUtils::toHex() For IPv4 it will resemble: ABCD1234 For IPv6: v6-ABCD1234000000000000000000000000 BETWEEN is then used to identify revisions within a given range",
"type": "binary",
"options": { "length": 35, "notnull": true, "default": "" }
}
],
"indexes": [
{ "name": "ipc_rev_timestamp", "columns": [ "ipc_rev_timestamp" ], "unique": false },
{ "name": "ipc_hex_time", "columns": [ "ipc_hex", "ipc_rev_timestamp" ], "unique": false }
],
"pk": [ "ipc_rev_id" ]
},
{
"name": "page_props",
"comment": "Name/value pairs indexed by page_id",
"columns": [
{
"name": "pp_page",
"type": "integer",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "pp_propname",
"type": "binary",
"options": { "length": 60, "notnull": true }
},
{
"name": "pp_value",
"type": "blob",
"options": { "length": 65530, "notnull": true }
},
{
"name": "pp_sortkey",
"type": "float",
"options": { "notnull": false }
}
],
"indexes": [
{ "name": "pp_propname_page", "columns": [ "pp_propname", "pp_page" ], "unique": true },
{ "name": "pp_propname_sortkey_page", "columns": [ "pp_propname", "pp_sortkey", "pp_page" ], "unique": true, "options": { "where": "(pp_sortkey IS NOT NULL)" } }
],
"pk": [ "pp_page", "pp_propname" ]
},
{
"name": "job",
"comment": "Jobs performed by parallel apache threads or a command-line daemon",
"columns": [
{
"name": "job_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "job_cmd",
"comment": "Command name. Limited to 60 to prevent key length overflow",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 60 }
},
{
"name": "job_namespace",
"comment": "Namespace to act on. Should be 0 if the command does not operate on a title",
"type": "integer",
"options": { "notnull": true }
},
{
"name": "job_title",
"comment": "Title to act on. Should be '' if the command does not operate on a title",
"type": "binary",
"options": { "notnull": true, "length": 255 }
},
{
"name": "job_timestamp",
"comment": "Timestamp of when the job was inserted. NULL for jobs added before addition of the timestamp",
"type": "mwtimestamp",
"options": { "notnull": false }
},
{
"name": "job_params",
"comment": "Any other parameters to the command. Stored as a PHP serialized array, or an empty string if there are no parameters",
"type": "blob",
"options": { "notnull": true, "length": 16777215 }
},
{
"name": "job_random",
"comment": "Random, non-unique, number used for job acquisition (for lock concurrency)",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "default": 0 }
},
{
"name": "job_attempts",
"comment": "The number of times this job has been locked",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "default": 0 }
},
{
"name": "job_token",
"comment": "Field that conveys process locks on rows via process UUIDs",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 32 }
},
{
"name": "job_token_timestamp",
"comment": "Timestamp when the job was locked",
"type": "mwtimestamp",
"options": { "notnull": false }
},
{
"name": "job_sha1",
"comment": "Base 36 SHA1 of the job parameters relevant to detecting duplicates",
"type": "binary",
"options": { "notnull": true, "length": 32, "default": "" }
}
],
"indexes": [
{ "name": "job_sha1", "columns": [ "job_sha1" ], "unique": false },
{ "name": "job_cmd_token", "columns": [ "job_cmd", "job_token", "job_random" ], "unique": false },
{ "name": "job_cmd_token_id", "columns": [ "job_cmd", "job_token", "job_id" ], "unique": false },
{ "name": "job_cmd", "columns": [ "job_cmd", "job_namespace", "job_title", "job_params" ],
"unique": false,
"options": { "lengths": [ null, null, null, 128 ] }
},
{ "name": "job_timestamp", "columns": [ "job_timestamp" ], "unique": false }
],
"pk": [ "job_id" ]
},
{
"name": "slot_roles",
"comment": "Normalization table for role names",
"columns": [
{
"name": "role_id",
"type": "integer",
"options": { "notnull": true, "autoincrement": true }
},
{
"name": "role_name",
"type": "binary",
"options": { "notnull": true, "length": 64 }
}
],
"indexes": [
{
"name": "role_name",
"columns": [ "role_name" ],
"comment": "Index for looking up the internal ID of a role",
"unique": true
}
],
"pk": [ "role_id" ]
},
{
"name": "content_models",
"comment": "Normalization table for content model names",
"columns": [
{
"name": "model_id",
"type": "integer",
"options": { "notnull": true, "autoincrement": true }
},
{
"name": "model_name",
"type": "binary",
"options": { "notnull": true, "length": 64 }
}
],
"indexes": [
{
"name": "model_name",
"columns": [ "model_name" ],
"comment": "Index for looking up the internal ID of a model",
"unique": true
}
],
"pk": [ "model_id" ]
},
{
"name": "categorylinks",
"comment": "Track category inclusions *used inline* This tracks a single level of category membership",
"columns": [
{
"name": "cl_from",
"comment": "Key to page_id of the page defined as a category member.",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "default": 0 }
},
{
"name": "cl_to",
"comment": "Name of the category. This is also the page_title of the category's description page; all such pages are in namespace 14 (NS_CATEGORY).",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 255 }
},
{
"name": "cl_sortkey",
"comment": "A binary string obtained by applying a sortkey generation algorithm (Collation::getSortKey()) to page_title, or cl_sortkey_prefix . \"\\n\" page_title if cl_sortkey_prefix is nonempty.",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 230 }
},
{
"name": "cl_sortkey_prefix",
"comment": "A prefix for the raw sortkey manually specified by the user, either via [[Category:Foo|prefix]] or {{defaultsort:prefix}}. If nonempty, it's concatenated with a line break followed by the page title before the sortkey conversion algorithm is run. We store this so that we can update collations without reparsing all pages. Note: If you change the length of this field, you also need to change code in LinksUpdate.php. See T27254.",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 255 }
},
{
"name": "cl_timestamp",
"comment": "This isn't really used at present. Provided for an optional sorting method by approximate addition time.",
"type": "datetimetz",
"options": { "notnull": true, "PlatformOptions": { "version": true } }
},
{
"name": "cl_collation",
"comment": "Stores $wgCategoryCollation at the time cl_sortkey was generated. This can be used to install new collation versions, tracking which rows are not yet updated. '' means no collation, this is a legacy row that needs to be updated by updateCollation.php. In the future, it might be possible to specify different collations per category.",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 32 }
},
{
"name": "cl_type",
"comment": "Stores whether cl_from is a category, file, or other page, so we can paginate the three categories separately. This only has to be updated when moving pages into or out of the category namespace, since file pages cannot be moved to other namespaces, nor can non-files be moved into the file namespace.",
"type": "mwenum",
"options": { "notnull": true, "default": "page",
"CustomSchemaOptions": {
"enum_values": [ "page", "subcat", "file" ]
}
}
},
{
"name": "cl_collation_id",
"comment": "FK to collation_id",
"type": "smallint",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "cl_target_id",
"type": "bigint",
"comment": "Foreign key to linktarget.lt_id",
"options": { "notnull": false, "unsigned": true }
}
],
"indexes": [
{
"name": "cl_sortkey",
"comment": "We always sort within a given category, and within a given type. FIXME: Formerly this index didn't cover cl_type (since that didn't exist), so old callers won't be using an index: fix this?",
"columns": [ "cl_to", "cl_type", "cl_sortkey", "cl_from" ],
"unique": false
},
{
"name": "cl_timestamp",
"comment": "Used by the API (and some extensions)",
"columns": [ "cl_to", "cl_timestamp" ],
"unique": false
},
{
"name": "cl_sortkey_id",
"comment": "We always sort within a given category, and within a given type. FIXME: Formerly this index didn't cover cl_type (since that didn't exist), so old callers won't be using an index: fix this?",
"columns": [ "cl_target_id", "cl_type", "cl_sortkey", "cl_from" ],
"unique": false
}
],
"pk": [ "cl_from", "cl_to" ]
},
{
"name": "logging",
"columns": [
{
"name": "log_id",
"comment": "Log ID, for referring to this specific log entry, probably for deletion and such.",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "log_type",
"comment": "Symbolic key for the general log type. The output format will be controlled by the log_action field.",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 32 }
},
{
"name": "log_action",
"comment": "Symbolic key for the log action type.",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 32 }
},
{
"name": "log_timestamp",
"type": "mwtimestamp",
"options": { "notnull": true, "default": "19700101000000" }
},
{
"name": "log_actor",
"type": "bigint",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "log_namespace",
"comment": "Key to the namespace of the page affected",
"type": "integer",
"options": { "notnull": true, "default": 0 }
},
{
"name": "log_title",
"comment": "Key to the title of the page affected",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 255 }
},
{
"name": "log_page",
"comment": "Key to the page affected",
"type": "integer",
"options": { "notnull": false, "unsigned": true }
},
{
"name": "log_comment_id",
"comment": "Key to comment_id. Comment summarizing the change.",
"type": "bigint",
"options": { "notnull": true, "unsigned": true }
},
{
"name": "log_params",
"comment": "LF separated list (old system) or serialized PHP array (new system)",
"type": "blob",
"options": { "notnull": true, "length": 65530 }
},
{
"name": "log_deleted",
"comment": "rev_deleted for logs",
"type": "mwtinyint",
"options": { "notnull": true, "unsigned": true, "default": 0 }
}
],
"indexes": [
{
"name": "log_type_time",
"comment": "Special:Log type filter",
"columns": [ "log_type", "log_timestamp" ],
"unique": false
},
{
"name": "log_actor_time",
"comment": "Special:Log performer filter",
"columns": [ "log_actor", "log_timestamp" ],
"unique": false
},
{
"name": "log_page_time",
"comment": "Special:Log title filter, log extract",
"columns": [ "log_namespace", "log_title", "log_timestamp" ],
"unique": false
},
{
"name": "log_times",
"comment": "Special:Log unfiltered",
"columns": [ "log_timestamp" ],
"unique": false
},
{
"name": "log_actor_type_time",
"comment": "Special:Log filter by performer and type",
"columns": [ "log_actor", "log_type", "log_timestamp" ],
"unique": false
},
{
"name": "log_page_id_time",
"comment": "Apparently just used for a few maintenance pages (findMissingFiles.php, Flow). Could be removed?",
"columns": [ "log_page", "log_timestamp" ],
"unique": false
},
{
"name": "log_type_action",
"comment": "Special:Log action filter",
"columns": [ "log_type", "log_action", "log_timestamp" ],
"unique": false
}
],
"pk": [ "log_id" ]
},
{
"name": "uploadstash",
"comment": "Store information about newly uploaded files before they're moved into the actual filestore",
"columns": [
{
"name": "us_id",
"type": "integer",
"options": {
"autoincrement": true,
"unsigned": true,
"notnull": true
}
},
{
"name": "us_user",
"comment": "the user who uploaded the file.",
"type": "integer",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "us_key",
"comment": "file key. this is how applications actually search for the file. this might go away, or become the primary key.",
"type": "string",
"options": {
"notnull": true,
"length": 255
}
},
{
"name": "us_orig_path",
"comment": "the original path",
"type": "string",
"options": {
"notnull": true,
"length": 255
}
},
{
"name": "us_path",
"comment": "the temporary path at which the file is actually stored",
"type": "string",
"options": {
"notnull": true,
"length": 255
}
},
{
"name": "us_source_type",
"comment": "which type of upload the file came from (sometimes)",
"type": "string",
"options": {
"notnull": false,
"length": 50
}
},
{
"name": "us_timestamp",
"comment": "the date/time on which the file was added",
"type": "mwtimestamp",
"options": {
"notnull": true
}
},
{
"name": "us_status",
"type": "string",
"options": {
"notnull": true,
"length": 50
}
},
{
"name": "us_chunk_inx",
"comment": "chunk counter starts at 0, current offset is stored in us_size",
"type": "integer",
"options": {
"unsigned": true,
"notnull": false
}
},
{
"name": "us_props",
"comment": "Serialized file properties from FSFile::getProps()",
"type": "blob",
"options": {
"notnull": false,
"length": 65530
}
},
{
"name": "us_size",
"comment": "file size in bytes",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "us_sha1",
"comment": "this hash comes from FSFile::getSha1Base36(), and is 31 characters",
"type": "string",
"options": {
"notnull": true,
"length": 31
}
},
{
"name": "us_mime",
"type": "string",
"options": {
"notnull": false,
"length": 255
}
},
{
"name": "us_media_type",
"comment": "Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table",
"type": "mwenum",
"options": { "notnull": false, "default": null,
"fixed": true,
"CustomSchemaOptions": {
"enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
}
}
},
{
"name": "us_image_width",
"comment": "image-specific properties",
"type": "integer",
"options": {
"unsigned": true,
"notnull": false
}
},
{
"name": "us_image_height",
"type": "integer",
"options": {
"unsigned": true,
"notnull": false
}
},
{
"name": "us_image_bits",
"type": "smallint",
"options": {
"unsigned": true,
"notnull": false
}
}
],
"indexes": [
{
"name": "us_user",
"comment": "sometimes there's a delete for all of a user's stuff.",
"columns": [
"us_user"
],
"unique": false
},
{
"name": "us_key",
"comment": "pick out files by key, enforce key uniqueness",
"columns": [
"us_key"
],
"unique": true
},
{
"name": "us_timestamp",
"comment": "the abandoned upload cleanup script needs this",
"columns": [
"us_timestamp"
],
"unique": false
}
],
"pk": [
"us_id"
]
},
{
"name": "filearchive",
"comment": "Record of deleted file data",
"columns": [
{
"name": "fa_id",
"comment": "Unique row id",
"type": "integer",
"options": {
"autoincrement": true,
"unsigned": true,
"notnull": true
}
},
{
"name": "fa_name",
"comment": "Original base filename; key to image.img_name, page.page_title, etc",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 255
}
},
{
"name": "fa_archive_name",
"comment": "Filename of archived file, if an old revision",
"type": "binary",
"options": {
"notnull": false,
"default": "",
"length": 255
}
},
{
"name": "fa_storage_group",
"comment": "Which storage bin (directory tree or object store) the file data is stored in. Should be 'deleted' for files that have been deleted; any other bin is not yet in use.",
"type": "binary",
"options": {
"notnull": false,
"length": 16
}
},
{
"name": "fa_storage_key",
"comment": "SHA-1 of the file contents plus extension, used as a key for storage. eg 8f8a562add37052a1848ff7771a2c515db94baa9.jpg. If NULL, the file was missing at deletion time or has been purged from the archival storage.",
"type": "binary",
"options": {
"notnull": false,
"default": "",
"length": 64
}
},
{
"name": "fa_deleted_user",
"type": "integer",
"options": {
"notnull": false
}
},
{
"name": "fa_deleted_timestamp",
"type": "mwtimestamp",
"options": {
"notnull": false
}
},
{
"name": "fa_deleted_reason_id",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "fa_size",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": false,
"default": 0
}
},
{
"name": "fa_width",
"type": "integer",
"options": {
"notnull": false,
"default": 0
}
},
{
"name": "fa_height",
"type": "integer",
"options": {
"notnull": false,
"default": 0
}
},
{
"name": "fa_metadata",
"type": "blob",
"options": {
"notnull": false,
"length": 16777215
}
},
{
"name": "fa_bits",
"type": "integer",
"options": {
"notnull": false,
"default": 0
}
},
{
"name": "fa_media_type",
"type": "mwenum",
"options": {
"notnull": false,
"default": null,
"CustomSchemaOptions": {
"enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
}
}
},
{
"name": "fa_major_mime",
"type": "mwenum",
"options": {
"notnull": false,
"default": "unknown",
"CustomSchemaOptions": {
"enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
}
}
},
{
"name": "fa_minor_mime",
"type": "binary",
"options": {
"notnull": false,
"default": "unknown",
"length": 100
}
},
{
"name": "fa_description_id",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "fa_actor",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "fa_timestamp",
"type": "mwtimestamp",
"options": {
"notnull": false
}
},
{
"name": "fa_deleted",
"comment": "Visibility of deleted revisions, bitfield",
"type": "mwtinyint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "fa_sha1",
"comment": "sha1 hash of file content",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 32
}
}
],
"indexes": [
{
"name": "fa_name",
"comment": "pick out by image name",
"columns": [
"fa_name",
"fa_timestamp"
],
"unique": false
},
{
"name": "fa_storage_group",
"comment": "pick out dupe files",
"columns": [
"fa_storage_group",
"fa_storage_key"
],
"unique": false
},
{
"name": "fa_deleted_timestamp",
"comment": "sort by deletion time",
"columns": [
"fa_deleted_timestamp"
],
"unique": false
},
{
"name": "fa_actor_timestamp",
"comment": "sort by uploader",
"columns": [
"fa_actor",
"fa_timestamp"
],
"unique": false
},
{
"name": "fa_sha1",
"comment": "find file by sha1, 10 bytes will be enough for hashes to be indexed",
"columns": [
"fa_sha1"
],
"unique": false,
"options": { "lengths": [ 10 ] }
}
],
"pk": [
"fa_id"
]
},
{
"name": "text",
"comment": "Holds text of individual page revisions. Field names are a holdover from the 'old' revisions table in MediaWiki 1.4 and earlier: an upgrade will transform that table into the 'text' table to minimize unnecessary churning and downtime. If upgrading, the other fields will be left unused. This table can also hold metadata of files if the metadata is too big to store in img_metadata, oi_metadata or fa_metadata.",
"columns": [
{
"name": "old_id",
"comment": "Unique text storage key number. Note that the 'oldid' parameter used in URLs does *not* refer to this number anymore, but to rev_id. content.content_address refers to this column. Also img_metadata, oi_metadata or fa_metadata can refer to this column when being used to store file metadata.",
"type": "integer",
"options": {
"autoincrement": true,
"unsigned": true,
"notnull": true
}
},
{
"name": "old_text",
"comment": "Depending on the contents of the old_flags field, the text may be convenient plain text, or it may be funkily encoded.",
"type": "blob",
"options": {
"notnull": true,
"length": 16777215
}
},
{
"name": "old_flags",
"comment": "Comma-separated list of flags:\n* gzip: text is compressed with PHP's gzdeflate() function.\n* utf-8: text was stored as UTF-8. If $wgLegacyEncoding option is on, rows *without* this flag will be converted to UTF-8 transparently at load time. Note that due to a bug in a maintenance script, this flag may have been stored as 'utf8' in some cases (T18841).\n* object: text field contained a serialized PHP object. The object either contains multiple versions compressed together to achieve a better compression ratio, or it refers to another row where the text can be found.\n* external: text was stored in an external location specified by old_text. Any additional flags apply to the data stored at that URL, not the URL itself. The 'object' flag is *not* set for URLs of the form 'DB://cluster/id/itemid', because the external storage system itself decompresses these.",
"type": "blob",
"options": {
"notnull": true,
"length": 255
}
}
],
"indexes": [],
"pk": [
"old_id"
]
},
{
"name": "oldimage",
"comment": "Previous revisions of uploaded files. Awkwardly, image rows have to be moved into this table at re-upload time.",
"columns": [
{
"name": "oi_name",
"comment": "Base filename: key to image.img_name",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 255
}
},
{
"name": "oi_archive_name",
"comment": "Filename of the archived file. This is generally a timestamp and '!' prepended to the base name.",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 255
}
},
{
"name": "oi_size",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "oi_width",
"type": "integer",
"options": {
"notnull": true,
"default": 0
}
},
{
"name": "oi_height",
"type": "integer",
"options": {
"notnull": true,
"default": 0
}
},
{
"name": "oi_bits",
"type": "integer",
"options": {
"notnull": true,
"default": 0
}
},
{
"name": "oi_description_id",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "oi_actor",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "oi_timestamp",
"type": "mwtimestamp",
"options": {
"notnull": true
}
},
{
"name": "oi_metadata",
"type": "blob",
"options": {
"notnull": true,
"length": 16777215
}
},
{
"name": "oi_media_type",
"type": "mwenum",
"options": {
"notnull": false,
"default": null,
"CustomSchemaOptions": {
"enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
}
}
},
{
"name": "oi_major_mime",
"type": "mwenum",
"options": {
"notnull": true,
"default": "unknown",
"CustomSchemaOptions": {
"enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
}
}
},
{
"name": "oi_minor_mime",
"type": "binary",
"options": {
"notnull": true,
"default": "unknown",
"length": 100
}
},
{
"name": "oi_deleted",
"type": "mwtinyint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "oi_sha1",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 32
}
}
],
"indexes": [
{
"name": "oi_actor_timestamp",
"columns": [
"oi_actor",
"oi_timestamp"
],
"unique": false
},
{
"name": "oi_name_timestamp",
"columns": [
"oi_name",
"oi_timestamp"
],
"unique": false
},
{
"name": "oi_name_archive_name",
"comment": "oi_archive_name truncated to 14 to avoid key length overflow",
"columns": [
"oi_name",
"oi_archive_name"
],
"unique": false,
"options": { "lengths": [ null, 14 ] }
},
{
"name": "oi_sha1",
"columns": [
"oi_sha1"
],
"unique": false,
"options": { "lengths": [ 10 ] }
},
{
"name": "oi_timestamp",
"comment": "Used by Special:ListFiles",
"columns": [
"oi_timestamp"
],
"unique": false
}
]
},
{
"name": "objectcache",
"comment": "For a few generic cache operations if not using Memcached",
"columns": [
{
"name": "keyname",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 255 }
},
{
"name": "value",
"type": "blob",
"options": { "notnull": false, "length": 16777215 }
},
{
"name": "exptime",
"type": "mwtimestamp",
"options": { "notnull": true }
},
{
"name": "modtoken",
"type": "string",
"options": { "notnull": true, "length": 17, "default": "00000000000000000" }
},
{
"name": "flags",
"type": "integer",
"options": { "notnull": false, "unsigned": true, "default": null }
}
],
"indexes": [
{ "name": "exptime", "columns": [ "exptime" ], "unique": false }
],
"pk": [ "keyname" ]
},
{
"name": "block",
"comment": "Blocks against user accounts, IP addresses and IP ranges.",
"columns": [
{
"name": "bl_id",
"comment": "Primary key.",
"type": "integer",
"options": {
"autoincrement": true,
"notnull": true,
"unsigned": true
}
},
{
"name": "bl_target",
"comment": "The block target. Foreign key to block_target.bt_id.",
"type": "integer",
"options": {
"notnull": true,
"unsigned": true
}
},
{
"name": "bl_by_actor",
"comment": "Actor who made the block.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "bl_reason_id",
"comment": "Key to comment_id. Text comment made by blocker.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "bl_timestamp",
"comment": "Creation (or refresh) date in standard YMDHMS form. IP blocks expire automatically.",
"type": "mwtimestamp",
"options": {
"notnull": true
}
},
{
"name": "bl_anon_only",
"comment": "If set to 1, block applies only to logged-out users and temporary users.",
"type": "mwtinyint",
"options": {
"notnull": true,
"length": 1,
"default": 0
}
},
{
"name": "bl_create_account",
"comment": "Block prevents account creation from matching IP addresses",
"type": "mwtinyint",
"options": {
"notnull": true,
"length": 1,
"default": 1
}
},
{
"name": "bl_enable_autoblock",
"comment": "Block triggers autoblocks",
"type": "mwtinyint",
"options": {
"notnull": true,
"length": 1,
"default": 1
}
},
{
"name": "bl_expiry",
"comment": "Time at which the block will expire. May be \"infinity\"",
"type": "mwtimestamp",
"options": {
"notnull": true,
"CustomSchemaOptions": {
"allowInfinite": true
}
}
},
{
"name": "bl_deleted",
"comment": "If true, this block causes the username to be hidden, and the expiry must be infinite. This is denormalized into rev_deleted and the other deleted bitfields (T346716).",
"type": "mwtinyint",
"options": {
"notnull": true,
"length": 1,
"default": 0
}
},
{
"name": "bl_block_email",
"comment": "Block prevents user from accessing Special:Emailuser",
"type": "mwtinyint",
"options": {
"notnull": true,
"length": 1,
"default": 0
}
},
{
"name": "bl_allow_usertalk",
"comment": "Block allows user to edit their own talk page",
"type": "mwtinyint",
"options": {
"notnull": true,
"length": 1,
"default": 0
}
},
{
"name": "bl_parent_block_id",
"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.",
"type": "integer",
"options": {
"notnull": false,
"unsigned": true,
"default": null
}
},
{
"name": "bl_sitewide",
"comment": "Block user from editing any page on the site (other than their own user talk page).",
"type": "mwtinyint",
"options": {
"notnull": true,
"length": 1,
"default": 1
}
}
],
"indexes": [
{
"name": "bl_timestamp",
"comment": "Index for Special:BlockList",
"columns": [
"bl_timestamp"
],
"unique": false
},
{
"name": "bl_target",
"comment": "For searching by target",
"columns": [ "bl_target" ],
"unique": false
},
{
"name": "bl_expiry",
"comment": "Index for table pruning",
"columns": [
"bl_expiry"
],
"unique": false
},
{
"name": "bl_parent_block_id",
"comment": "Index for removing autoblocks when a parent block is removed",
"columns": [
"bl_parent_block_id"
],
"unique": false
}
],
"pk": [
"bl_id"
]
},
{
"name": "block_target",
"comment": "The targets of blocks",
"columns": [
{
"name": "bt_id",
"comment": "Primary key.",
"type": "integer",
"options": {
"autoincrement": true,
"notnull": true,
"unsigned": true
}
},
{
"name": "bt_address",
"comment": "Blocked IP address or range in dotted-quad form, or null for a user block. If bt_auto is 1 then the address is private.",
"type": "blob",
"options": {
"notnull": false,
"length": 255
}
},
{
"name": "bt_user",
"comment": "Blocked user ID or null for IP blocks.",
"type": "integer",
"options": {
"notnull": false,
"unsigned": true
}
},
{
"name": "bt_user_text",
"comment": "The name of the blocked user, or null for IP blocks. For Special:BlockList sorting (T48013).",
"type": "binary",
"options": {
"notnull": false,
"length": 255
}
},
{
"name": "bt_auto",
"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.",
"type": "mwtinyint",
"options": {
"notnull": true,
"length": 1,
"default": 0
}
},
{
"name": "bt_range_start",
"comment": "Start of an address range, in hexadecimal. Null for single-IP and user blocks.",
"type": "blob",
"options": {
"notnull": false,
"length": 255
}
},
{
"name": "bt_range_end",
"comment": "End of an address range, in hexadecimal. Null for single-IP and user blocks.",
"type": "blob",
"options": {
"notnull": false,
"length": 255
}
},
{
"name": "bt_ip_hex",
"comment": "If the block is for a single IP, this is the IP address in hexadecimal. If the block is for a range, the start of the range in hexadecimal, identical to bt_range_start.",
"type": "blob",
"options": {
"notnull": false,
"length": 255
}
},
{
"name": "bt_count",
"comment": "The number of block rows associated with this target.",
"type": "integer",
"options": {
"notnull": true,
"default": 0
}
}
],
"indexes": [
{
"name": "bt_address",
"comment": "For finding single IP blocks and for Special:BlockList searching.",
"columns": [ "bt_address" ],
"options": { "lengths": [ 42 ] },
"unique": false
},
{
"name": "bt_ip_user_text",
"comment": "For sorting Special:BlockList by target (T48013)",
"columns": [ "bt_ip_hex", "bt_user_text" ],
"options": { "lengths": [ 35, 255 ] },
"unique": false
},
{
"name": "bt_range",
"comment": "For querying whether an IP address is in any range",
"columns": [
"bt_range_start",
"bt_range_end"
],
"options": { "lengths": [ 35, 35 ] },
"unique": false
},
{
"name": "bt_user",
"comment": "For querying whether a logged-in user is blocked",
"columns": [ "bt_user" ],
"unique": false
}
],
"pk": [
"bt_id"
]
},
{
"name": "image",
"comment": "Uploaded images and other files.",
"columns": [
{
"name": "img_name",
"comment": "Filename. This is also the title of the associated description page, which will be in namespace 6 (NS_FILE).",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 255
}
},
{
"name": "img_size",
"comment": "File size in bytes.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "img_width",
"comment": "For images, width in pixels.",
"type": "integer",
"options": {
"notnull": true,
"default": 0
}
},
{
"name": "img_height",
"comment": "For images, height in pixels.",
"type": "integer",
"options": {
"notnull": true,
"default": 0
}
},
{
"name": "img_metadata",
"comment": "Extracted Exif metadata stored as a json array (new system) or serialized PHP array (old system). The json array can contain an address in the text table or external storage.",
"type": "blob",
"options": {
"notnull": true,
"length": 16777215
}
},
{
"name": "img_bits",
"comment": "For images, bits per pixel if known.",
"type": "integer",
"options": {
"notnull": true,
"default": 0
}
},
{
"name": "img_media_type",
"comment": "Media type as defined by the MEDIATYPE_xxx constants",
"type": "mwenum",
"options": {
"notnull": false,
"default": null,
"CustomSchemaOptions": {
"enum_values": [ "UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE", "3D" ]
}
}
},
{
"name": "img_major_mime",
"comment": "major part of a MIME media type as defined by IANA see https://www.iana.org/assignments/media-types/ for \"chemical\" cf. http://dx.doi.org/10.1021/ci9803233 by the ACS",
"type": "mwenum",
"options": {
"notnull": true,
"default": "unknown",
"CustomSchemaOptions": {
"enum_values": [ "unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart", "chemical" ]
}
}
},
{
"name": "img_minor_mime",
"comment": "minor part of a MIME media type as defined by IANA the minor parts are not required to adhere to any standard but should be consistent throughout the database see https://www.iana.org/assignments/media-types/",
"type": "binary",
"options": {
"notnull": true,
"default": "unknown",
"length": 100
}
},
{
"name": "img_description_id",
"comment": "Foreign key to comment table, which contains the description field as entered by the uploader. This is displayed in image upload history and logs.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "img_actor",
"comment": "actor_id of the uploader.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "img_timestamp",
"comment": "Time of the upload.",
"type": "mwtimestamp",
"options": {
"notnull": true
}
},
{
"name": "img_sha1",
"comment": "SHA-1 content hash in base-36",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 32
}
}
],
"indexes": [
{
"name": "img_actor_timestamp",
"comment": "Used by Special:Newimages and ApiQueryAllImages",
"columns": [
"img_actor",
"img_timestamp"
],
"unique": false
},
{
"name": "img_size",
"comment": "Used by Special:ListFiles for sort-by-size",
"columns": [
"img_size"
],
"unique": false
},
{
"name": "img_timestamp",
"comment": "Used by Special:Newimages and Special:ListFiles",
"columns": [
"img_timestamp"
],
"unique": false
},
{
"name": "img_sha1",
"comment": "Used in API and duplicate search",
"columns": [
"img_sha1"
],
"unique": false,
"options": { "lengths": [ 10 ] }
},
{
"name": "img_media_mime",
"comment": "Used to get media of one type",
"columns": [
"img_media_type",
"img_major_mime",
"img_minor_mime"
],
"unique": false
}
],
"pk": [
"img_name"
]
},
{
"name": "recentchanges",
"comment": "Primarily a summary table for Special:RecentChanges, this table contains some additional info on edits from the last few days",
"columns": [
{
"name": "rc_id",
"type": "bigint",
"options": {
"autoincrement": true,
"unsigned": true,
"notnull": true
}
},
{
"name": "rc_timestamp",
"type": "mwtimestamp",
"options": {
"notnull": true
}
},
{
"name": "rc_actor",
"comment": "As in revision",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "rc_namespace",
"comment": "When pages are renamed, their RC entries do _not_ change.",
"type": "integer",
"options": {
"notnull": true,
"default": 0
}
},
{
"name": "rc_title",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 255
}
},
{
"name": "rc_comment_id",
"comment": "as in revision...",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "rc_minor",
"type": "mwtinyint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_bot",
"comment": "Edits by user accounts with the 'bot' rights key are marked with a 1 here, and will be hidden from the default view.",
"type": "mwtinyint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_new",
"comment": "Set if this change corresponds to a page creation",
"type": "mwtinyint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_cur_id",
"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.",
"type": "integer",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_this_oldid",
"comment": "rev_id of the given revision",
"type": "integer",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_last_oldid",
"comment": "rev_id of the prior revision, for generating diff links.",
"type": "integer",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_type",
"comment": "The type of change entry (RC_EDIT,RC_NEW,RC_LOG,RC_EXTERNAL)",
"type": "mwtinyint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_source",
"comment": "The source of the change entry (replaces rc_type) default of '' is temporary, needed for initial migration",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 16
}
},
{
"name": "rc_patrolled",
"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.",
"type": "mwtinyint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_ip",
"comment": "Recorded IP address the edit was made from, if the $wgPutIPinRC option is enabled.",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 40
}
},
{
"name": "rc_old_len",
"comment": "Text length in characters before the edit",
"type": "integer",
"options": {
"notnull": false
}
},
{
"name": "rc_new_len",
"comment": "Text length in characters after the edit",
"type": "integer",
"options": {
"notnull": false
}
},
{
"name": "rc_deleted",
"comment": "Visibility of recent changes items, bitfield",
"type": "mwtinyint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_logid",
"comment": "Value corresponding to log_id, specific log entries",
"type": "integer",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "rc_log_type",
"comment": "Store log type info here, or null",
"type": "binary",
"options": {
"notnull": false,
"default": null,
"length": 255
}
},
{
"name": "rc_log_action",
"comment": "Store log action or null",
"type": "binary",
"options": {
"notnull": false,
"default": null,
"length": 255
}
},
{
"name": "rc_params",
"comment": "Log params",
"type": "blob",
"options": {
"notnull": false,
"length": 65535
}
}
],
"indexes": [
{
"name": "rc_timestamp",
"comment": "Special:Recentchanges",
"columns": [
"rc_timestamp"
],
"unique": false
},
{
"name": "rc_namespace_title_timestamp",
"comment": "Special:Watchlist",
"columns": [
"rc_namespace",
"rc_title",
"rc_timestamp"
],
"unique": false
},
{
"name": "rc_cur_id",
"comment": "Special:Recentchangeslinked when finding changes in pages linked from a page",
"columns": [
"rc_cur_id"
],
"unique": false
},
{
"name": "rc_new_name_timestamp",
"comment": "Special:Newpages",
"columns": [
"rc_new",
"rc_namespace",
"rc_timestamp"
],
"unique": false
},
{
"name": "rc_ip",
"comment": "Blank unless $wgPutIPinRC=true (false at WMF), possibly used by extensions, but mostly replaced by CheckUser.",
"columns": [
"rc_ip"
],
"unique": false
},
{
"name": "rc_ns_actor",
"comment": "Probably intended for Special:NewPages namespace filter",
"columns": [
"rc_namespace",
"rc_actor"
],
"unique": false
},
{
"name": "rc_actor",
"comment": "SiteStats active user count, Special:ActiveUsers, Special:NewPages user filter",
"columns": [
"rc_actor",
"rc_timestamp"
],
"unique": false
},
{
"name": "rc_name_type_patrolled_timestamp",
"comment": "ApiQueryRecentChanges (T140108)",
"columns": [
"rc_namespace",
"rc_type",
"rc_patrolled",
"rc_timestamp"
],
"unique": false
},
{
"name": "rc_this_oldid",
"comment": "Article.php and friends (T139012)",
"columns": [
"rc_this_oldid"
],
"unique": false
}
],
"pk": [
"rc_id"
]
},
{
"name": "archive",
"comment": "Archive area for deleted pages and their revisions. These may be viewed (and restored) by admins through the Special:Undelete interface.",
"columns": [
{
"name": "ar_id",
"comment": "Primary key",
"type": "integer",
"options": {
"autoincrement": true,
"unsigned": true,
"notnull": true
}
},
{
"name": "ar_namespace",
"comment": "Copied from page_namespace",
"type": "integer",
"options": {
"notnull": true,
"default": 0
}
},
{
"name": "ar_title",
"comment": "Copied from page_title",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 255
}
},
{
"name": "ar_comment_id",
"comment": "Basic revision stuff.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "ar_actor",
"comment": "Basic revision stuff.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "ar_timestamp",
"comment": "Basic revision stuff.",
"type": "mwtimestamp",
"options": {
"notnull": true
}
},
{
"name": "ar_minor_edit",
"comment": "Basic revision stuff.",
"type": "mwtinyint",
"options": {
"notnull": true,
"default": 0
}
},
{
"name": "ar_rev_id",
"comment": "Copied from rev_id.",
"type": "integer",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "ar_deleted",
"comment": "Copied from rev_deleted. Although this may be raised during deletion. Users with the \"suppressrevision\" right may \"archive\" and \"suppress\" content in a single action. @since 1.10",
"type": "mwtinyint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "ar_len",
"comment": "Copied from rev_len, length of this revision in bytes. @since 1.10",
"type": "integer",
"options": {
"unsigned": true,
"notnull": false
}
},
{
"name": "ar_page_id",
"comment": "Copied from page_id. Restoration will attempt to use this as page ID if no current page with the same name exists. Otherwise, the revisions will be restored under the current page. Can be used for manual undeletion by developers if multiple pages by the same name were archived. @since 1.11 Older entries will have NULL.",
"type": "integer",
"options": {
"unsigned": true,
"notnull": false
}
},
{
"name": "ar_parent_id",
"comment": "Copied from rev_parent_id. @since 1.13",
"type": "integer",
"options": {
"unsigned": true,
"notnull": false,
"default": null
}
},
{
"name": "ar_sha1",
"comment": "Copied from rev_sha1, SHA-1 text content hash in base-36 @since 1.19",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 32
}
}
],
"indexes": [
{
"name": "ar_name_title_timestamp",
"comment": "Index for Special:Undelete to page through deleted revisions",
"columns": [
"ar_namespace",
"ar_title",
"ar_timestamp"
],
"unique": false
},
{
"name": "ar_actor_timestamp",
"comment": "Index for Special:DeletedContributions",
"columns": [
"ar_actor",
"ar_timestamp"
],
"unique": false
},
{
"name": "ar_revid_uniq",
"comment": "Index for linking archive rows with tables that normally link with revision rows, such as change_tag.",
"columns": [
"ar_rev_id"
],
"unique": true
}
],
"pk": [
"ar_id"
]
},
{
"name": "page",
"comment": "Core of the wiki: each page has an entry here which identifies it by title and contains some essential metadata.",
"columns": [
{
"name": "page_id",
"comment": "Unique identifier number. The page_id will be preserved across edits and rename operations, but not deletions and recreations.",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "page_namespace",
"comment": "A page name is broken into a namespace and a title. The namespace keys are UI-language-independent constants, defined in includes/Defines.php",
"type": "integer",
"options": { "notnull": true }
},
{
"name": "page_title",
"comment": "The rest of the title, as text. Spaces are transformed into underscores in title storage.",
"type": "binary",
"options": { "notnull": true, "length": 255 }
},
{
"name": "page_is_redirect",
"comment": "1 indicates the article is a redirect. If so, there is a row in the `redirect` table with rd_from=page_id, which contains the redirect target.",
"type": "mwtinyint",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "page_is_new",
"comment": "1 indicates this is a new entry, with only one edit. Not all pages with one edit are new pages.",
"type": "mwtinyint",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "page_random",
"comment": "Random value between 0 and 1, used for Special:Randompage",
"type": "float",
"options": {
"notnull": true,
"unsigned": true,
"CustomSchemaOptions": {
"doublePrecision": true
}
}
},
{
"name": "page_touched",
"comment": "This timestamp is updated whenever the page changes in a way requiring it to be re-rendered, invalidating caches. Aside from editing this includes permission changes, creation or deletion of linked pages, and alteration of contained templates.",
"type": "mwtimestamp",
"options": { "notnull": true }
},
{
"name": "page_links_updated",
"comment": "This timestamp is updated whenever a page is re-parsed and it has all the link tracking tables updated for it. This is useful for de-duplicating expensive backlink update jobs.",
"type": "mwtimestamp",
"options": {
"notnull": false,
"default": null
}
},
{
"name": "page_latest",
"comment": "Handy key to revision.rev_id of the current revision. This may be 0 during page creation, but that shouldn't happen outside of a transaction... hopefully.",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "page_len",
"comment": "Uncompressed length in bytes of the page's current source text.",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "page_content_model",
"comment": "content model, see CONTENT_MODEL_XXX constants",
"type": "binary",
"options": { "length": 32, "notnull": false }
},
{
"name": "page_lang",
"comment": "Page content language",
"type": "binary",
"options": { "length": 35, "notnull": false }
}
],
"indexes": [
{
"name": "page_name_title",
"columns": [ "page_namespace", "page_title" ],
"comment": "The title index. Care must be taken to always specify a namespace when by title, so that the index is used. Even listing all known namespaces with IN() is better than omitting page_namespace from the WHERE clause.",
"unique": true
},
{
"name": "page_random",
"columns": [ "page_random" ],
"comment": "Index for Special:Random",
"unique": false
},
{
"name": "page_len",
"columns": [ "page_len" ],
"comment": "Questionable utility, used by ProofreadPage, possibly DynamicPageList. ApiQueryAllPages unconditionally filters on namespace and so hopefully does not use it.",
"unique": false
},
{
"name": "page_redirect_namespace_len",
"columns": [ "page_is_redirect", "page_namespace", "page_len" ],
"comment": "The index for Special:Shortpages and Special:Longpages. Also SiteStats::articles() in 'comma' counting mode, MessageCache::loadFromDB().",
"unique": false
}
],
"pk": [ "page_id" ]
},
{
"name": "user",
"comment": "The user table contains basic account information, authentication keys, etc. Some multi-wiki sites may share a single central user table between separate wikis using the $wgSharedDB setting. Note that even when an external authentication plugin is in use, user table entries still need to be created to store preferences and to key tracking information in the other tables",
"columns": [
{
"name": "user_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "user_name",
"comment": "Usernames must be unique, must not be in the form of an IP address. They should not allow slashes or case conflicts. Spaces are allowed, and are not converted to underscores like in page titles.",
"type": "binary",
"options": { "notnull": true, "length": 255, "default": "" }
},
{
"name": "user_real_name",
"comment": "Optional 'real name' to be displayed in credit listings",
"type": "binary",
"options": { "notnull": true, "length": 255, "default": "" }
},
{
"name": "user_password",
"comment": "Password hashes",
"type": "blob",
"options": { "notnull": true, "length": 255 }
},
{
"name": "user_newpassword",
"comment": "When using 'mail me a new password', a random password is generated and the hash stored here. The previous password is left in place until someone actually logs in with the new password, at which point the hash is moved to user_password and the old password is invalidated.",
"type": "blob",
"options": { "notnull": true, "length": 255 }
},
{
"name": "user_newpass_time",
"comment": "Timestamp of the last time when a new password was sent, for throttling and expiring purposes. Emailed passwords will expire $wgNewPasswordExpiry (a week) after being set. If user_newpass_time is NULL (eg. created by mail) it doesn't expire.",
"type": "mwtimestamp",
"options": { "notnull": false }
},
{
"name": "user_email",
"comment": "User email. Non public info.",
"type": "text",
"options": { "notnull": true, "length": 255 }
},
{
"name": "user_touched",
"comment": "If the browser sends an If-Modified-Since header, a 304 response is suppressed if the value in this field for the current user is later than the value in the IMS header. That is, this field is an invalidation timestamp for the browser cache of logged-in users. Among other things, it is used to prevent pages generated for a previously logged in user from being displayed after a session expiry followed by a fresh login.",
"type": "mwtimestamp",
"options": { "notnull": true }
},
{
"name": "user_token",
"comment": "A pseudorandomly generated value that is stored in a cookie when the 'remember password' feature is used (previously, a hash of the password was used, but this was vulnerable to cookie-stealing attacks)",
"type": "binary",
"options": { "notnull": true, "default": "", "length": 32, "fixed": true }
},
{
"name": "user_email_authenticated",
"comment": "Initially NULL; when a user's e-mail address has been validated by returning with a mailed token, this is set to the current timestamp.",
"type": "mwtimestamp",
"options": { "notnull": false }
},
{
"name": "user_email_token",
"comment": "Randomly generated token created when the e-mail address is set and a confirmation test mail sent.",
"type": "binary",
"options": { "notnull": false, "length": 32, "fixed": true }
},
{
"name": "user_email_token_expires",
"comment": "Expiration date for the user_email_token.",
"type": "mwtimestamp",
"options": { "notnull": false }
},
{
"name": "user_registration",
"comment": "Timestamp of account registration. Accounts predating this schema addition may contain NULL.",
"type": "mwtimestamp",
"options": { "notnull": false }
},
{
"name": "user_editcount",
"comment": "Count of edits and edit-like actions. Not intended to be an accurate copy of 'COUNT(*) WHERE rev_actor refers to a user's actor_id'. May contain NULL for old accounts if batch-update scripts haven't been run, as well as listing deleted edits and other myriad ways it could be out of sync. Meant primarily for heuristic checks to give an impression of whether the account has been used much.",
"type": "integer",
"options": { "notnull": false, "unsigned": true }
},
{
"name": "user_password_expires",
"comment": "Expiration date for user password.",
"type": "mwtimestamp",
"options": {
"notnull": false,
"CustomSchemaOptions": {
"allowInfinite": true
}
}
},
{
"name": "user_is_temp",
"comment": "This exists to allow temporary users to be identified from the database only, by external applications, and is not for use within MediaWiki (see T333223). A boolean value representing whether the user is a temporary user. Zero if any type of user other than a temporary user.",
"type": "mwtinyint",
"options": {
"notnull": true,
"length": 1,
"default": 0
}
}
],
"indexes": [
{ "name": "user_name", "columns": [ "user_name" ], "unique": true },
{ "name": "user_email_token", "columns": [ "user_email_token" ], "unique": false },
{ "name": "user_email", "columns": [ "user_email" ], "unique": false, "options": { "lengths": [ 50, null, null ] } }
],
"pk": [ "user_id" ]
},
{
"name": "user_autocreate_serial",
"comment": "Table for sequential name generation for auto-created temporary users",
"columns": [
{
"name": "uas_shard",
"comment": "The segment of ID space, ID mod N, referred to by this row",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "uas_year",
"comment": "The year to which this row belongs, if $wgAutoCreateTempUser['serialProvider']['useYear'] is true.",
"type": "smallint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "uas_value",
"comment": "The maximum allocated ID value",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
}
],
"indexes": [],
"pk": [ "uas_shard", "uas_year" ]
},
{
"name": "revision",
"comment": "Every edit of a page creates also a revision row. This stores metadata about the revision, and a reference to the text storage backend.",
"columns": [
{
"name": "rev_id",
"comment": "Unique ID to identify each revision",
"type": "bigint",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "rev_page",
"comment": "Key to page_id. This should never be invalid",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "rev_comment_id",
"comment": "Key to comment.comment_id. Comment summarizing the change",
"type": "bigint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "rev_actor",
"comment": "Key to actor.actor_id of the user or IP who made this edit",
"type": "bigint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "rev_timestamp",
"comment": "Timestamp of when revision was created",
"type": "mwtimestamp",
"options": { "notnull": true }
},
{
"name": "rev_minor_edit",
"comment": "Records whether the user marked the 'minor edit' checkbox. Many automated edits are marked as minor",
"type": "mwtinyint",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "rev_deleted",
"comment": "Restrictions on who can access this revision",
"type": "mwtinyint",
"options": { "notnull": true, "unsigned": true, "default": 0 }
},
{
"name": "rev_len",
"comment": "Length of this revision in bytes",
"type": "integer",
"options": { "unsigned": true, "notnull": false }
},
{
"name": "rev_parent_id",
"comment": "Key to revision.rev_id. This field is used to add support for a tree structure (The Adjacency List Model)",
"type": "bigint",
"options": { "unsigned": true, "notnull": false }
},
{
"name": "rev_sha1",
"comment": "SHA-1 text content hash in base-36",
"type": "binary",
"options": { "length": 32, "notnull": true, "default": "" }
}
],
"indexes": [
{
"name": "rev_timestamp",
"columns": [ "rev_timestamp" ],
"comment": "Used by ApiQueryAllRevisions",
"unique": false
},
{
"name": "rev_page_timestamp",
"columns": [ "rev_page", "rev_timestamp" ],
"comment": "History index",
"unique": false
},
{
"name": "rev_actor_timestamp",
"columns": [ "rev_actor", "rev_timestamp", "rev_id" ],
"comment": "User contributions index",
"unique": false
},
{
"name": "rev_page_actor_timestamp",
"columns": [ "rev_page", "rev_actor", "rev_timestamp" ],
"comment": "Credits index. This is scanned in order to compile credits lists for pages, in ApiQueryContributors. Also for ApiQueryRevisions if rvuser is specified",
"unique": false
}
],
"pk": [ "rev_id" ]
},
{
"name": "searchindex",
"comment": "search backend, this is actively used in MySQL but created and not used in Postgres while there are plans to use it in the future (T220450). This table must be MyISAM in MySQL; InnoDB does not support the needed fulltext index.",
"columns": [
{
"name": "si_page",
"comment": "Key to page_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "si_title",
"comment": "Munged version of title",
"type": "text",
"options": { "notnull": true, "length": 16777215 }
},
{
"name": "si_text",
"comment": "Munged version of body text",
"type": "text",
"options": { "notnull": true, "length": 16777215 }
}
],
"indexes": [
{
"name": "si_title",
"columns": [ "si_title" ],
"unique": false,
"flags": [
"fulltext"
]
},
{
"name": "si_text",
"columns": [ "si_text" ],
"unique": false,
"flags": [
"fulltext"
]
}
],
"pk": [ "si_page" ],
"table_options": [
"ENGINE=MyISAM",
"DEFAULT CHARSET=utf8mb4"
]
},
{
"name": "linktarget",
"comment": "Holds immutable records of link targets, used mostly for links tables.",
"columns": [
{
"name": "lt_id",
"comment": "primary key",
"type": "bigint",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "lt_namespace",
"comment": "Namespace of the link target",
"type": "integer",
"options": { "notnull": true }
},
{
"name": "lt_title",
"comment": "Text part of link target excluding namespace",
"type": "binary",
"options": { "length": 255, "notnull": true }
}
],
"indexes": [
{ "name": "lt_namespace_title", "columns": [ "lt_namespace", "lt_title" ], "unique": true }
],
"pk": [ "lt_id" ]
},
{
"name": "file",
"comment": "Uploaded images and other files.",
"columns": [
{
"name": "file_id",
"comment": "primary key",
"type": "bigint",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "file_name",
"comment": "Name of the file",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "file_latest",
"comment": "FK to fr_id",
"type": "bigint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "file_type",
"comment": "FK to file_types.ft_id",
"type": "smallint",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "file_deleted",
"comment": "Whether the file is deleted",
"type": "smallint",
"options": { "unsigned": true, "notnull": true }
}
],
"indexes": [
{
"name": "file_name",
"comment": "To find files based on their name",
"columns": [
"file_name"
],
"unique": true
},
{
"name": "file_latest",
"comment": "To allow join with filerevision table",
"columns": [
"file_latest"
],
"unique": false
}
],
"pk": [ "file_id" ]
},
{
"name": "filerevision",
"comment": "Revisions of the files",
"columns": [
{
"name": "fr_id",
"comment": "primary key",
"type": "bigint",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "fr_file",
"comment": "FK to file_id",
"type": "bigint",
"options": { "notnull": true }
},
{
"name": "fr_size",
"comment": "File size in bytes.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "fr_width",
"comment": "For images, width in pixels.",
"type": "integer",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "fr_height",
"comment": "For images, height in pixels.",
"type": "integer",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "fr_metadata",
"comment": "Extracted Exif metadata stored as a json array (new system) or serialized PHP array (old system). The json array can contain an address in the text table or external storage.",
"type": "blob",
"options": {
"notnull": true,
"length": 16777215
}
},
{
"name": "fr_bits",
"comment": "For images, bits per pixel if known.",
"type": "integer",
"options": {
"unsigned": true,
"notnull": true,
"default": 0
}
},
{
"name": "fr_description_id",
"comment": "Foreign key to comment table, which contains the description field as entered by the uploader. This is displayed in image upload history and logs.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "fr_actor",
"comment": "actor_id of the uploader.",
"type": "bigint",
"options": {
"unsigned": true,
"notnull": true
}
},
{
"name": "fr_timestamp",
"comment": "Time of the upload.",
"type": "mwtimestamp",
"options": {
"notnull": true
}
},
{
"name": "fr_sha1",
"comment": "SHA-1 content hash in base-36",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 32
}
},
{
"name": "fr_archive_name",
"comment": "Filename of the archived file. This is generally a timestamp and '!' prepended to the base name.",
"type": "binary",
"options": {
"notnull": true,
"default": "",
"length": 255
}
},
{
"name": "fr_deleted",
"comment": "Whether the file is deleted",
"type": "smallint",
"options": { "unsigned": true, "notnull": true }
}
],
"indexes": [
{
"name": "fr_actor_timestamp",
"comment": "Used by Special:Newimages and ApiQueryAllImages",
"columns": [
"fr_actor",
"fr_timestamp"
],
"unique": false
},
{
"name": "fr_size",
"comment": "Used by Special:ListFiles for sort-by-size",
"columns": [
"fr_size"
],
"unique": false
},
{
"name": "fr_timestamp",
"comment": "Used by Special:Newimages and Special:ListFiles",
"columns": [
"fr_timestamp"
],
"unique": false
},
{
"name": "fr_sha1",
"comment": "Used in API and duplicate search",
"columns": [
"fr_sha1"
],
"unique": false,
"options": { "lengths": [ 10 ] }
},
{
"name": "fr_file",
"comment": "To find all filerevisions belonging to one file",
"columns": [
"fr_file"
],
"unique": false
}
],
"pk": [ "fr_id" ]
},
{
"name": "filetypes",
"comment": "Valid file types",
"columns": [
{
"name": "ft_id",
"comment": "primary key",
"type": "smallint",
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
},
{
"name": "ft_media_type",
"comment": "Media type as defined by the MEDIATYPE_xxx constants",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "ft_major_mime",
"comment": "major part of a MIME media type as defined by IANA see https://www.iana.org/assignments/media-types/ for \"chemical\" cf. http://dx.doi.org/10.1021/ci9803233 by the ACS",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "ft_minor_mime",
"comment": "minor part of a MIME media type as defined by IANA the minor parts are not required to adhere to any standard but should be consistent throughout the database see https://www.iana.org/assignments/media-types/",
"type": "binary",
"options": { "length": 255, "notnull": true }
}
],
"indexes": [
{
"name": "ft_media_mime",
"comment": "Used to get media of one type",
"columns": [
"ft_media_type",
"ft_major_mime",
"ft_minor_mime"
],
"unique": true
}
],
"pk": [ "ft_id" ]
},
{
"name": "collation",
"comment": "Normalization table for collation names",
"columns": [
{
"name": "collation_id",
"type": "smallint",
"options": { "notnull": true, "unsigned": true, "autoincrement": true }
},
{
"name": "collation_name",
"type": "binary",
"options": { "notnull": true, "length": 64 }
}
],
"indexes": [
{
"name": "collation_name",
"columns": [ "collation_name" ],
"comment": "Index for looking up the internal ID of a collation",
"unique": true
}
],
"pk": [ "collation_id" ]
}
]
|