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