| 1 | [ |
| 2 | { |
| 3 | "name": "discussiontools_items", |
| 4 | "columns": [ |
| 5 | { |
| 6 | "name": "it_id", |
| 7 | "type": "integer", |
| 8 | "options": { |
| 9 | "autoincrement": true, |
| 10 | "unsigned": true, |
| 11 | "notnull": true |
| 12 | } |
| 13 | }, |
| 14 | { |
| 15 | "name": "it_itemname", |
| 16 | "comment": "Internal name used to identify this item across all pages and revisions where it might appear, see CommentParser::computeName()", |
| 17 | "type": "binary", |
| 18 | "options": { |
| 19 | "notnull": true, |
| 20 | "length": 255 |
| 21 | } |
| 22 | }, |
| 23 | { |
| 24 | "name": "it_timestamp", |
| 25 | "comment": "Date and time from signature, or null for headings", |
| 26 | "type": "mwtimestamp", |
| 27 | "options": { |
| 28 | "notnull": false |
| 29 | } |
| 30 | }, |
| 31 | { |
| 32 | "name": "it_actor", |
| 33 | "comment": "Author from signature, or null for headings. (key to actor.actor_id)", |
| 34 | "type": "bigint", |
| 35 | "options": { |
| 36 | "unsigned": true, |
| 37 | "notnull": false |
| 38 | } |
| 39 | } |
| 40 | ], |
| 41 | "indexes": [ |
| 42 | { |
| 43 | "name": "it_itemname", |
| 44 | "comment": "", |
| 45 | "columns": [ |
| 46 | "it_itemname" |
| 47 | ], |
| 48 | "unique": true |
| 49 | } |
| 50 | ], |
| 51 | "pk": [ |
| 52 | "it_id" |
| 53 | ] |
| 54 | }, |
| 55 | { |
| 56 | "name": "discussiontools_item_ids", |
| 57 | "columns": [ |
| 58 | { |
| 59 | "name": "itid_id", |
| 60 | "type": "integer", |
| 61 | "options": { |
| 62 | "autoincrement": true, |
| 63 | "unsigned": true, |
| 64 | "notnull": true |
| 65 | } |
| 66 | }, |
| 67 | { |
| 68 | "name": "itid_itemid", |
| 69 | "comment": "Internal ID used to identify this item in this revision, see CommentParser::computeId()", |
| 70 | "type": "binary", |
| 71 | "options": { |
| 72 | "notnull": true, |
| 73 | "length": 255 |
| 74 | } |
| 75 | } |
| 76 | ], |
| 77 | "indexes": [ |
| 78 | { |
| 79 | "name": "itid_itemid", |
| 80 | "comment": "", |
| 81 | "columns": [ |
| 82 | "itid_itemid" |
| 83 | ], |
| 84 | "unique": true |
| 85 | } |
| 86 | ], |
| 87 | "pk": [ |
| 88 | "itid_id" |
| 89 | ] |
| 90 | }, |
| 91 | { |
| 92 | "name": "discussiontools_item_pages", |
| 93 | "comment": "Data in this table is redundant to discussiontools_item_revisions, but if we want to find all pages where a given comment has appeared, querying it from that table would require some awful joins and be expensive", |
| 94 | "columns": [ |
| 95 | { |
| 96 | "name": "itp_id", |
| 97 | "type": "integer", |
| 98 | "options": { |
| 99 | "autoincrement": true, |
| 100 | "unsigned": true, |
| 101 | "notnull": true |
| 102 | } |
| 103 | }, |
| 104 | { |
| 105 | "name": "itp_items_id", |
| 106 | "comment": "(key to discussiontools_items.it_id)", |
| 107 | "type": "integer", |
| 108 | "options": { |
| 109 | "unsigned": true, |
| 110 | "notnull": true |
| 111 | } |
| 112 | }, |
| 113 | { |
| 114 | "name": "itp_page_id", |
| 115 | "comment": "(key to page.page_id)", |
| 116 | "type": "bigint", |
| 117 | "options": { |
| 118 | "unsigned": true, |
| 119 | "notnull": true |
| 120 | } |
| 121 | }, |
| 122 | { |
| 123 | "name": "itp_oldest_revision_id", |
| 124 | "comment": "(key to revision.rev_id)", |
| 125 | "type": "bigint", |
| 126 | "options": { |
| 127 | "unsigned": true, |
| 128 | "notnull": true |
| 129 | } |
| 130 | }, |
| 131 | { |
| 132 | "name": "itp_newest_revision_id", |
| 133 | "comment": "(key to revision.rev_id)", |
| 134 | "type": "bigint", |
| 135 | "options": { |
| 136 | "unsigned": true, |
| 137 | "notnull": true |
| 138 | } |
| 139 | } |
| 140 | ], |
| 141 | "indexes": [ |
| 142 | { |
| 143 | "name": "itp_items_id_page_id", |
| 144 | "comment": "insertThreadItems()", |
| 145 | "columns": [ |
| 146 | "itp_items_id", |
| 147 | "itp_page_id" |
| 148 | ], |
| 149 | "unique": true |
| 150 | }, |
| 151 | { |
| 152 | "name": "itp_items_id_newest_revision_id", |
| 153 | "comment": "findNewestRevisionsByName(), findNewestRevisionsById()", |
| 154 | "columns": [ |
| 155 | "itp_items_id", |
| 156 | "itp_newest_revision_id" |
| 157 | ], |
| 158 | "unique": true |
| 159 | } |
| 160 | ], |
| 161 | "pk": [ |
| 162 | "itp_id" |
| 163 | ] |
| 164 | }, |
| 165 | { |
| 166 | "name": "discussiontools_item_revisions", |
| 167 | "comment": "", |
| 168 | "columns": [ |
| 169 | { |
| 170 | "name": "itr_id", |
| 171 | "type": "integer", |
| 172 | "options": { |
| 173 | "autoincrement": true, |
| 174 | "unsigned": true, |
| 175 | "notnull": true |
| 176 | } |
| 177 | }, |
| 178 | { |
| 179 | "name": "itr_itemid_id", |
| 180 | "comment": "(key to discussiontools_item_ids.itid_id)", |
| 181 | "type": "integer", |
| 182 | "options": { |
| 183 | "notnull": true |
| 184 | } |
| 185 | }, |
| 186 | { |
| 187 | "name": "itr_revision_id", |
| 188 | "comment": "(key to revision.rev_id)", |
| 189 | "type": "bigint", |
| 190 | "options": { |
| 191 | "unsigned": true, |
| 192 | "notnull": true |
| 193 | } |
| 194 | }, |
| 195 | { |
| 196 | "name": "itr_items_id", |
| 197 | "comment": "(key to discussiontools_items.it_id)", |
| 198 | "type": "integer", |
| 199 | "options": { |
| 200 | "notnull": true |
| 201 | } |
| 202 | }, |
| 203 | { |
| 204 | "name": "itr_parent_id", |
| 205 | "comment": "(key to discussiontools_item_revisions.itr_id)", |
| 206 | "type": "integer", |
| 207 | "options": { |
| 208 | "notnull": false |
| 209 | } |
| 210 | }, |
| 211 | { |
| 212 | "name": "itr_transcludedfrom", |
| 213 | "comment": "Page where this item is transcluded from (null: not transcluded, 0: transcluded from unknown page) (key to page.page_id)", |
| 214 | "type": "bigint", |
| 215 | "options": { |
| 216 | "unsigned": true, |
| 217 | "notnull": false |
| 218 | } |
| 219 | }, |
| 220 | { |
| 221 | "name": "itr_level", |
| 222 | "comment": "Indentation level (0 for headings, 1+ for comments)", |
| 223 | "type": "mwtinyint", |
| 224 | "options": { |
| 225 | "notnull": true |
| 226 | } |
| 227 | }, |
| 228 | { |
| 229 | "name": "itr_headinglevel", |
| 230 | "comment": "Heading level (1-6), or null for placeholder headings and comments", |
| 231 | "type": "mwtinyint", |
| 232 | "options": { |
| 233 | "notnull": false |
| 234 | } |
| 235 | } |
| 236 | ], |
| 237 | "indexes": [ |
| 238 | { |
| 239 | "name": "itr_revision_id", |
| 240 | "comment": "findThreadItemsInCurrentRevision()", |
| 241 | "columns": [ |
| 242 | "itr_revision_id" |
| 243 | ], |
| 244 | "unique": false |
| 245 | }, |
| 246 | { |
| 247 | "name": "itr_itemid_id_revision_id", |
| 248 | "comment": "findNewestRevisionsByName(), findNewestRevisionsById(), insertThreadItems()", |
| 249 | "columns": [ |
| 250 | "itr_itemid_id", |
| 251 | "itr_revision_id" |
| 252 | ], |
| 253 | "unique": true |
| 254 | } |
| 255 | ], |
| 256 | "pk": [ |
| 257 | "itr_id" |
| 258 | ] |
| 259 | } |
| 260 | ] |