| 1 | { |
| 2 | "comment": "Rename page_timestamp index to have 'rev_' prefix (T270033)", |
| 3 | "before": { |
| 4 | "name": "revision", |
| 5 | "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.", |
| 6 | "columns": [ |
| 7 | { |
| 8 | "name": "rev_id", |
| 9 | "comment": "Unique ID to identify each revision", |
| 10 | "type": "integer", |
| 11 | "options": { "unsigned": true, "notnull": true, "autoincrement": true } |
| 12 | }, |
| 13 | { |
| 14 | "name": "rev_page", |
| 15 | "comment": "Key to page_id. This should never be invalid", |
| 16 | "type": "integer", |
| 17 | "options": { "unsigned": true, "notnull": true } |
| 18 | }, |
| 19 | { |
| 20 | "name": "rev_comment_id", |
| 21 | "comment": "Key to comment.comment_id. Comment summarizing the change", |
| 22 | "type": "bigint", |
| 23 | "options": { "unsigned": true, "notnull": true, "default": 0 } |
| 24 | }, |
| 25 | { |
| 26 | "name": "rev_actor", |
| 27 | "comment": "Key to actor.actor_id of the user or IP who made this edit", |
| 28 | "type": "bigint", |
| 29 | "options": { "unsigned": true, "notnull": true, "default": 0 } |
| 30 | }, |
| 31 | { |
| 32 | "name": "rev_timestamp", |
| 33 | "comment": "Timestamp of when revision was created", |
| 34 | "type": "mwtimestamp", |
| 35 | "options": { "notnull": true, "default": "" } |
| 36 | }, |
| 37 | { |
| 38 | "name": "rev_minor_edit", |
| 39 | "comment": "Records whether the user marked the 'minor edit' checkbox. Many automated edits are marked as minor", |
| 40 | "type": "mwtinyint", |
| 41 | "options": { "notnull": true, "unsigned": true, "default": 0 } |
| 42 | }, |
| 43 | { |
| 44 | "name": "rev_deleted", |
| 45 | "comment": "Restrictions on who can access this revision", |
| 46 | "type": "mwtinyint", |
| 47 | "options": { "notnull": true, "unsigned": true, "default": 0 } |
| 48 | }, |
| 49 | { |
| 50 | "name": "rev_len", |
| 51 | "comment": "Length of this revision in bytes", |
| 52 | "type": "integer", |
| 53 | "options": { "unsigned": true, "notnull": false } |
| 54 | }, |
| 55 | { |
| 56 | "name": "rev_parent_id", |
| 57 | "comment": "Key to revision.rev_id. This field is used to add support for a tree structure (The Adjacency List Model)", |
| 58 | "type": "integer", |
| 59 | "options": { "unsigned": true, "notnull": false } |
| 60 | }, |
| 61 | { |
| 62 | "name": "rev_sha1", |
| 63 | "comment": "SHA-1 text content hash in base-36", |
| 64 | "type": "binary", |
| 65 | "options": { "length": 32, "notnull": true, "default": "" } |
| 66 | } |
| 67 | ], |
| 68 | "indexes": [ |
| 69 | { |
| 70 | "name": "rev_page_id", |
| 71 | "columns": [ "rev_page", "rev_id" ], |
| 72 | "comment": "The index is proposed for removal, do not use it in new code: T163532. Used for ordering revisions within a page by rev_id, which is usually incorrect, since rev_timestamp is normally the correct order. It can also be used by dumpBackup.php, if a page and rev_id range is specified.", |
| 73 | "unique": false |
| 74 | }, |
| 75 | { |
| 76 | "name": "rev_timestamp", |
| 77 | "columns": [ "rev_timestamp" ], |
| 78 | "comment": "Used by ApiQueryAllRevisions", |
| 79 | "unique": false |
| 80 | }, |
| 81 | { |
| 82 | "name": "page_timestamp", |
| 83 | "columns": [ "rev_page", "rev_timestamp" ], |
| 84 | "comment": "History index", |
| 85 | "unique": false |
| 86 | }, |
| 87 | { |
| 88 | "name": "rev_actor_timestamp", |
| 89 | "columns": [ "rev_actor", "rev_timestamp", "rev_id" ], |
| 90 | "comment": "User contributions index", |
| 91 | "unique": false |
| 92 | }, |
| 93 | { |
| 94 | "name": "rev_page_actor_timestamp", |
| 95 | "columns": [ "rev_page", "rev_actor", "rev_timestamp" ], |
| 96 | "comment": "Credits index. This is scanned in order to compile credits lists for pages, in ApiQueryContributors. Also for ApiQueryRevisions if rvuser is specified", |
| 97 | "unique": false |
| 98 | } |
| 99 | ], |
| 100 | "table_options": [ "/*$wgDBTableOptions*/", "MAX_ROWS=10000000", "AVG_ROW_LENGTH=1024" ], |
| 101 | "pk": [ "rev_id" ] |
| 102 | }, |
| 103 | "after": { |
| 104 | "name": "revision", |
| 105 | "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.", |
| 106 | "columns": [ |
| 107 | { |
| 108 | "name": "rev_id", |
| 109 | "comment": "Unique ID to identify each revision", |
| 110 | "type": "integer", |
| 111 | "options": { "unsigned": true, "notnull": true, "autoincrement": true } |
| 112 | }, |
| 113 | { |
| 114 | "name": "rev_page", |
| 115 | "comment": "Key to page_id. This should never be invalid", |
| 116 | "type": "integer", |
| 117 | "options": { "unsigned": true, "notnull": true } |
| 118 | }, |
| 119 | { |
| 120 | "name": "rev_comment_id", |
| 121 | "comment": "Key to comment.comment_id. Comment summarizing the change", |
| 122 | "type": "bigint", |
| 123 | "options": { "unsigned": true, "notnull": true, "default": 0 } |
| 124 | }, |
| 125 | { |
| 126 | "name": "rev_actor", |
| 127 | "comment": "Key to actor.actor_id of the user or IP who made this edit", |
| 128 | "type": "bigint", |
| 129 | "options": { "unsigned": true, "notnull": true, "default": 0 } |
| 130 | }, |
| 131 | { |
| 132 | "name": "rev_timestamp", |
| 133 | "comment": "Timestamp of when revision was created", |
| 134 | "type": "mwtimestamp", |
| 135 | "options": { "notnull": true, "default": "" } |
| 136 | }, |
| 137 | { |
| 138 | "name": "rev_minor_edit", |
| 139 | "comment": "Records whether the user marked the 'minor edit' checkbox. Many automated edits are marked as minor", |
| 140 | "type": "mwtinyint", |
| 141 | "options": { "notnull": true, "unsigned": true, "default": 0 } |
| 142 | }, |
| 143 | { |
| 144 | "name": "rev_deleted", |
| 145 | "comment": "Restrictions on who can access this revision", |
| 146 | "type": "mwtinyint", |
| 147 | "options": { "notnull": true, "unsigned": true, "default": 0 } |
| 148 | }, |
| 149 | { |
| 150 | "name": "rev_len", |
| 151 | "comment": "Length of this revision in bytes", |
| 152 | "type": "integer", |
| 153 | "options": { "unsigned": true, "notnull": false } |
| 154 | }, |
| 155 | { |
| 156 | "name": "rev_parent_id", |
| 157 | "comment": "Key to revision.rev_id. This field is used to add support for a tree structure (The Adjacency List Model)", |
| 158 | "type": "integer", |
| 159 | "options": { "unsigned": true, "notnull": false } |
| 160 | }, |
| 161 | { |
| 162 | "name": "rev_sha1", |
| 163 | "comment": "SHA-1 text content hash in base-36", |
| 164 | "type": "binary", |
| 165 | "options": { "length": 32, "notnull": true, "default": "" } |
| 166 | } |
| 167 | ], |
| 168 | "indexes": [ |
| 169 | { |
| 170 | "name": "rev_page_id", |
| 171 | "columns": [ "rev_page", "rev_id" ], |
| 172 | "comment": "The index is proposed for removal, do not use it in new code: T163532. Used for ordering revisions within a page by rev_id, which is usually incorrect, since rev_timestamp is normally the correct order. It can also be used by dumpBackup.php, if a page and rev_id range is specified.", |
| 173 | "unique": false |
| 174 | }, |
| 175 | { |
| 176 | "name": "rev_timestamp", |
| 177 | "columns": [ "rev_timestamp" ], |
| 178 | "comment": "Used by ApiQueryAllRevisions", |
| 179 | "unique": false |
| 180 | }, |
| 181 | { |
| 182 | "name": "rev_page_timestamp", |
| 183 | "columns": [ "rev_page", "rev_timestamp" ], |
| 184 | "comment": "History index", |
| 185 | "unique": false |
| 186 | }, |
| 187 | { |
| 188 | "name": "rev_actor_timestamp", |
| 189 | "columns": [ "rev_actor", "rev_timestamp", "rev_id" ], |
| 190 | "comment": "User contributions index", |
| 191 | "unique": false |
| 192 | }, |
| 193 | { |
| 194 | "name": "rev_page_actor_timestamp", |
| 195 | "columns": [ "rev_page", "rev_actor", "rev_timestamp" ], |
| 196 | "comment": "Credits index. This is scanned in order to compile credits lists for pages, in ApiQueryContributors. Also for ApiQueryRevisions if rvuser is specified", |
| 197 | "unique": false |
| 198 | } |
| 199 | ], |
| 200 | "table_options": [ "/*$wgDBTableOptions*/", "MAX_ROWS=10000000", "AVG_ROW_LENGTH=1024" ], |
| 201 | "pk": [ "rev_id" ] |
| 202 | } |
| 203 | } |