| 1 | { |
| 2 | "comment": "Drop legacy page.page_restrictions field (T35334)", |
| 3 | "before": { |
| 4 | "name": "page", |
| 5 | "comment": "Core of the wiki: each page has an entry here which identifies it by title and contains some essential metadata.", |
| 6 | "columns": [ |
| 7 | { |
| 8 | "name": "page_id", |
| 9 | "comment": "Unique identifier number. The page_id will be preserved across edits and rename operations, but not deletions and recreations.", |
| 10 | "type": "integer", |
| 11 | "options": { "unsigned": true, "notnull": true, "autoincrement": true } |
| 12 | }, |
| 13 | { |
| 14 | "name": "page_namespace", |
| 15 | "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", |
| 16 | "type": "integer", |
| 17 | "options": { "notnull": true } |
| 18 | }, |
| 19 | { |
| 20 | "name": "page_title", |
| 21 | "comment": "The rest of the title, as text. Spaces are transformed into underscores in title storage.", |
| 22 | "type": "binary", |
| 23 | "options": { "notnull": true, "length": 255 } |
| 24 | }, |
| 25 | { |
| 26 | "name": "page_restrictions", |
| 27 | "comment": "Comma-separated set of permission keys indicating who can move or edit the page.", |
| 28 | "type": "blob", |
| 29 | "options": { "notnull": false, "length": 255 } |
| 30 | }, |
| 31 | { |
| 32 | "name": "page_is_redirect", |
| 33 | "comment": "1 indicates the article is a redirect.", |
| 34 | "type": "mwtinyint", |
| 35 | "options": { "notnull": true, "unsigned": true, "default": 0 } |
| 36 | }, |
| 37 | { |
| 38 | "name": "page_is_new", |
| 39 | "comment": "1 indicates this is a new entry, with only one edit. Not all pages with one edit are new pages.", |
| 40 | "type": "mwtinyint", |
| 41 | "options": { "notnull": true, "unsigned": true, "default": 0 } |
| 42 | }, |
| 43 | { |
| 44 | "name": "page_random", |
| 45 | "comment": "Random value between 0 and 1, used for Special:Randompage", |
| 46 | "type": "float", |
| 47 | "options": { |
| 48 | "notnull": true, |
| 49 | "unsigned": true, |
| 50 | "CustomSchemaOptions": { |
| 51 | "doublePrecision": true |
| 52 | } |
| 53 | } |
| 54 | }, |
| 55 | { |
| 56 | "name": "page_touched", |
| 57 | "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.", |
| 58 | "type": "mwtimestamp", |
| 59 | "options": { "notnull": true } |
| 60 | }, |
| 61 | { |
| 62 | "name": "page_links_updated", |
| 63 | "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.", |
| 64 | "type": "mwtimestamp", |
| 65 | "options": { |
| 66 | "notnull": false, |
| 67 | "default": null, |
| 68 | "CustomSchemaOptions": { |
| 69 | "allowInfinite": true |
| 70 | } |
| 71 | } |
| 72 | }, |
| 73 | { |
| 74 | "name": "page_latest", |
| 75 | "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.", |
| 76 | "type": "integer", |
| 77 | "options": { "unsigned": true, "notnull": true } |
| 78 | }, |
| 79 | { |
| 80 | "name": "page_len", |
| 81 | "comment": "Uncompressed length in bytes of the page's current source text.", |
| 82 | "type": "integer", |
| 83 | "options": { "unsigned": true, "notnull": true } |
| 84 | }, |
| 85 | { |
| 86 | "name": "page_content_model", |
| 87 | "comment": "content model, see CONTENT_MODEL_XXX constants", |
| 88 | "type": "binary", |
| 89 | "options": { "length": 32, "notnull": false } |
| 90 | }, |
| 91 | { |
| 92 | "name": "page_lang", |
| 93 | "comment": "Page content language", |
| 94 | "type": "binary", |
| 95 | "options": { "length": 35, "notnull": false } |
| 96 | } |
| 97 | ], |
| 98 | "indexes": [ |
| 99 | { |
| 100 | "name": "page_name_title", |
| 101 | "columns": [ "page_namespace", "page_title" ], |
| 102 | "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.", |
| 103 | "unique": true |
| 104 | }, |
| 105 | { |
| 106 | "name": "page_random", |
| 107 | "columns": [ "page_random" ], |
| 108 | "comment": "Index for Special:Random", |
| 109 | "unique": false |
| 110 | }, |
| 111 | { |
| 112 | "name": "page_len", |
| 113 | "columns": [ "page_len" ], |
| 114 | "comment": "Questionable utility, used by ProofreadPage, possibly DynamicPageList. ApiQueryAllPages unconditionally filters on namespace and so hopefully does not use it.", |
| 115 | "unique": false |
| 116 | }, |
| 117 | { |
| 118 | "name": "page_redirect_namespace_len", |
| 119 | "columns": [ "page_is_redirect", "page_namespace", "page_len" ], |
| 120 | "comment": "The index for Special:Shortpages and Special:Longpages. Also SiteStats::articles() in 'comma' counting mode, MessageCache::loadFromDB().", |
| 121 | "unique": false |
| 122 | } |
| 123 | ], |
| 124 | "pk": [ "page_id" ] |
| 125 | }, |
| 126 | "after": { |
| 127 | "name": "page", |
| 128 | "comment": "Core of the wiki: each page has an entry here which identifies it by title and contains some essential metadata.", |
| 129 | "columns": [ |
| 130 | { |
| 131 | "name": "page_id", |
| 132 | "comment": "Unique identifier number. The page_id will be preserved across edits and rename operations, but not deletions and recreations.", |
| 133 | "type": "integer", |
| 134 | "options": { "unsigned": true, "notnull": true, "autoincrement": true } |
| 135 | }, |
| 136 | { |
| 137 | "name": "page_namespace", |
| 138 | "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", |
| 139 | "type": "integer", |
| 140 | "options": { "notnull": true } |
| 141 | }, |
| 142 | { |
| 143 | "name": "page_title", |
| 144 | "comment": "The rest of the title, as text. Spaces are transformed into underscores in title storage.", |
| 145 | "type": "binary", |
| 146 | "options": { "notnull": true, "length": 255 } |
| 147 | }, |
| 148 | { |
| 149 | "name": "page_is_redirect", |
| 150 | "comment": "1 indicates the article is a redirect.", |
| 151 | "type": "mwtinyint", |
| 152 | "options": { "notnull": true, "unsigned": true, "default": 0 } |
| 153 | }, |
| 154 | { |
| 155 | "name": "page_is_new", |
| 156 | "comment": "1 indicates this is a new entry, with only one edit. Not all pages with one edit are new pages.", |
| 157 | "type": "mwtinyint", |
| 158 | "options": { "notnull": true, "unsigned": true, "default": 0 } |
| 159 | }, |
| 160 | { |
| 161 | "name": "page_random", |
| 162 | "comment": "Random value between 0 and 1, used for Special:Randompage", |
| 163 | "type": "float", |
| 164 | "options": { |
| 165 | "notnull": true, |
| 166 | "unsigned": true, |
| 167 | "CustomSchemaOptions": { |
| 168 | "doublePrecision": true |
| 169 | } |
| 170 | } |
| 171 | }, |
| 172 | { |
| 173 | "name": "page_touched", |
| 174 | "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.", |
| 175 | "type": "mwtimestamp", |
| 176 | "options": { "notnull": true } |
| 177 | }, |
| 178 | { |
| 179 | "name": "page_links_updated", |
| 180 | "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.", |
| 181 | "type": "mwtimestamp", |
| 182 | "options": { |
| 183 | "notnull": false, |
| 184 | "default": null, |
| 185 | "CustomSchemaOptions": { |
| 186 | "allowInfinite": true |
| 187 | } |
| 188 | } |
| 189 | }, |
| 190 | { |
| 191 | "name": "page_latest", |
| 192 | "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.", |
| 193 | "type": "integer", |
| 194 | "options": { "unsigned": true, "notnull": true } |
| 195 | }, |
| 196 | { |
| 197 | "name": "page_len", |
| 198 | "comment": "Uncompressed length in bytes of the page's current source text.", |
| 199 | "type": "integer", |
| 200 | "options": { "unsigned": true, "notnull": true } |
| 201 | }, |
| 202 | { |
| 203 | "name": "page_content_model", |
| 204 | "comment": "content model, see CONTENT_MODEL_XXX constants", |
| 205 | "type": "binary", |
| 206 | "options": { "length": 32, "notnull": false } |
| 207 | }, |
| 208 | { |
| 209 | "name": "page_lang", |
| 210 | "comment": "Page content language", |
| 211 | "type": "binary", |
| 212 | "options": { "length": 35, "notnull": false } |
| 213 | } |
| 214 | ], |
| 215 | "indexes": [ |
| 216 | { |
| 217 | "name": "page_name_title", |
| 218 | "columns": [ "page_namespace", "page_title" ], |
| 219 | "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.", |
| 220 | "unique": true |
| 221 | }, |
| 222 | { |
| 223 | "name": "page_random", |
| 224 | "columns": [ "page_random" ], |
| 225 | "comment": "Index for Special:Random", |
| 226 | "unique": false |
| 227 | }, |
| 228 | { |
| 229 | "name": "page_len", |
| 230 | "columns": [ "page_len" ], |
| 231 | "comment": "Questionable utility, used by ProofreadPage, possibly DynamicPageList. ApiQueryAllPages unconditionally filters on namespace and so hopefully does not use it.", |
| 232 | "unique": false |
| 233 | }, |
| 234 | { |
| 235 | "name": "page_redirect_namespace_len", |
| 236 | "columns": [ "page_is_redirect", "page_namespace", "page_len" ], |
| 237 | "comment": "The index for Special:Shortpages and Special:Longpages. Also SiteStats::articles() in 'comma' counting mode, MessageCache::loadFromDB().", |
| 238 | "unique": false |
| 239 | } |
| 240 | ], |
| 241 | "pk": [ "page_id" ] |
| 242 | } |
| 243 | } |