Index: trunk/phase3/tests/phpunit/includes/db/DatabaseSqliteTest.php |
— | — | @@ -256,8 +256,9 @@ |
257 | 257 | $maint->loadParamsAndArgs( null, array( 'quiet' => 1 ) ); |
258 | 258 | } |
259 | 259 | |
| 260 | + global $IP; |
260 | 261 | $db = new DatabaseSqliteStandalone( ':memory:' ); |
261 | | - $db->sourceFile( dirname( __FILE__ ) . "/sqlite/tables-$version.sql" ); |
| 262 | + $db->sourceFile( "$IP/tests/phpunit/data/db/sqlite/tables-$version.sql" ); |
262 | 263 | $updater = DatabaseUpdater::newForDB( $db, false, $maint ); |
263 | 264 | $updater->doUpdates( array( 'core' ) ); |
264 | 265 | return $db; |
Index: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.16.sql |
— | — | @@ -0,0 +1,483 @@ |
| 2 | +-- This is a copy of MediaWiki 1.16 schema shared by MySQL and SQLite. |
| 3 | +-- It is used for updater testing. Comments are stripped to decrease |
| 4 | +-- file size, as we don't need to maintain it. |
| 5 | + |
| 6 | +CREATE TABLE /*_*/user ( |
| 7 | + user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 8 | + user_name varchar(255) binary NOT NULL default '', |
| 9 | + user_real_name varchar(255) binary NOT NULL default '', |
| 10 | + user_password tinyblob NOT NULL, |
| 11 | + user_newpassword tinyblob NOT NULL, |
| 12 | + user_newpass_time binary(14), |
| 13 | + user_email tinytext NOT NULL, |
| 14 | + user_options blob NOT NULL, |
| 15 | + user_touched binary(14) NOT NULL default '', |
| 16 | + user_token binary(32) NOT NULL default '', |
| 17 | + user_email_authenticated binary(14), |
| 18 | + user_email_token binary(32), |
| 19 | + user_email_token_expires binary(14), |
| 20 | + user_registration binary(14), |
| 21 | + user_editcount int |
| 22 | +) /*$wgDBTableOptions*/; |
| 23 | +CREATE UNIQUE INDEX /*i*/user_name ON /*_*/user (user_name); |
| 24 | +CREATE INDEX /*i*/user_email_token ON /*_*/user (user_email_token); |
| 25 | +CREATE TABLE /*_*/user_groups ( |
| 26 | + ug_user int unsigned NOT NULL default 0, |
| 27 | + ug_group varbinary(16) NOT NULL default '' |
| 28 | +) /*$wgDBTableOptions*/; |
| 29 | +CREATE UNIQUE INDEX /*i*/ug_user_group ON /*_*/user_groups (ug_user,ug_group); |
| 30 | +CREATE INDEX /*i*/ug_group ON /*_*/user_groups (ug_group); |
| 31 | +CREATE TABLE /*_*/user_newtalk ( |
| 32 | + user_id int NOT NULL default 0, |
| 33 | + user_ip varbinary(40) NOT NULL default '', |
| 34 | + user_last_timestamp binary(14) NOT NULL default '' |
| 35 | +) /*$wgDBTableOptions*/; |
| 36 | +CREATE INDEX /*i*/un_user_id ON /*_*/user_newtalk (user_id); |
| 37 | +CREATE INDEX /*i*/un_user_ip ON /*_*/user_newtalk (user_ip); |
| 38 | +CREATE TABLE /*_*/user_properties ( |
| 39 | + up_user int NOT NULL, |
| 40 | + up_property varbinary(32) NOT NULL, |
| 41 | + up_value blob |
| 42 | +) /*$wgDBTableOptions*/; |
| 43 | +CREATE UNIQUE INDEX /*i*/user_properties_user_property ON /*_*/user_properties (up_user,up_property); |
| 44 | +CREATE INDEX /*i*/user_properties_property ON /*_*/user_properties (up_property); |
| 45 | +CREATE TABLE /*_*/page ( |
| 46 | + page_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 47 | + page_namespace int NOT NULL, |
| 48 | + page_title varchar(255) binary NOT NULL, |
| 49 | + page_restrictions tinyblob NOT NULL, |
| 50 | + page_counter bigint unsigned NOT NULL default 0, |
| 51 | + page_is_redirect tinyint unsigned NOT NULL default 0, |
| 52 | + page_is_new tinyint unsigned NOT NULL default 0, |
| 53 | + page_random real unsigned NOT NULL, |
| 54 | + page_touched binary(14) NOT NULL default '', |
| 55 | + page_latest int unsigned NOT NULL, |
| 56 | + page_len int unsigned NOT NULL |
| 57 | +) /*$wgDBTableOptions*/; |
| 58 | +CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title); |
| 59 | +CREATE INDEX /*i*/page_random ON /*_*/page (page_random); |
| 60 | +CREATE INDEX /*i*/page_len ON /*_*/page (page_len); |
| 61 | +CREATE TABLE /*_*/revision ( |
| 62 | + rev_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 63 | + rev_page int unsigned NOT NULL, |
| 64 | + rev_text_id int unsigned NOT NULL, |
| 65 | + rev_comment tinyblob NOT NULL, |
| 66 | + rev_user int unsigned NOT NULL default 0, |
| 67 | + rev_user_text varchar(255) binary NOT NULL default '', |
| 68 | + rev_timestamp binary(14) NOT NULL default '', |
| 69 | + rev_minor_edit tinyint unsigned NOT NULL default 0, |
| 70 | + rev_deleted tinyint unsigned NOT NULL default 0, |
| 71 | + rev_len int unsigned, |
| 72 | + rev_parent_id int unsigned default NULL |
| 73 | +) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024; |
| 74 | +CREATE UNIQUE INDEX /*i*/rev_page_id ON /*_*/revision (rev_page, rev_id); |
| 75 | +CREATE INDEX /*i*/rev_timestamp ON /*_*/revision (rev_timestamp); |
| 76 | +CREATE INDEX /*i*/page_timestamp ON /*_*/revision (rev_page,rev_timestamp); |
| 77 | +CREATE INDEX /*i*/user_timestamp ON /*_*/revision (rev_user,rev_timestamp); |
| 78 | +CREATE INDEX /*i*/usertext_timestamp ON /*_*/revision (rev_user_text,rev_timestamp); |
| 79 | +CREATE TABLE /*_*/text ( |
| 80 | + old_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 81 | + old_text mediumblob NOT NULL, |
| 82 | + old_flags tinyblob NOT NULL |
| 83 | +) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=10240; |
| 84 | +CREATE TABLE /*_*/archive ( |
| 85 | + ar_namespace int NOT NULL default 0, |
| 86 | + ar_title varchar(255) binary NOT NULL default '', |
| 87 | + ar_text mediumblob NOT NULL, |
| 88 | + ar_comment tinyblob NOT NULL, |
| 89 | + ar_user int unsigned NOT NULL default 0, |
| 90 | + ar_user_text varchar(255) binary NOT NULL, |
| 91 | + ar_timestamp binary(14) NOT NULL default '', |
| 92 | + ar_minor_edit tinyint NOT NULL default 0, |
| 93 | + ar_flags tinyblob NOT NULL, |
| 94 | + ar_rev_id int unsigned, |
| 95 | + ar_text_id int unsigned, |
| 96 | + ar_deleted tinyint unsigned NOT NULL default 0, |
| 97 | + ar_len int unsigned, |
| 98 | + ar_page_id int unsigned, |
| 99 | + ar_parent_id int unsigned default NULL |
| 100 | +) /*$wgDBTableOptions*/; |
| 101 | +CREATE INDEX /*i*/name_title_timestamp ON /*_*/archive (ar_namespace,ar_title,ar_timestamp); |
| 102 | +CREATE INDEX /*i*/ar_usertext_timestamp ON /*_*/archive (ar_user_text,ar_timestamp); |
| 103 | +CREATE TABLE /*_*/pagelinks ( |
| 104 | + pl_from int unsigned NOT NULL default 0, |
| 105 | + pl_namespace int NOT NULL default 0, |
| 106 | + pl_title varchar(255) binary NOT NULL default '' |
| 107 | +) /*$wgDBTableOptions*/; |
| 108 | +CREATE UNIQUE INDEX /*i*/pl_from ON /*_*/pagelinks (pl_from,pl_namespace,pl_title); |
| 109 | +CREATE UNIQUE INDEX /*i*/pl_namespace ON /*_*/pagelinks (pl_namespace,pl_title,pl_from); |
| 110 | +CREATE TABLE /*_*/templatelinks ( |
| 111 | + tl_from int unsigned NOT NULL default 0, |
| 112 | + tl_namespace int NOT NULL default 0, |
| 113 | + tl_title varchar(255) binary NOT NULL default '' |
| 114 | +) /*$wgDBTableOptions*/; |
| 115 | +CREATE UNIQUE INDEX /*i*/tl_from ON /*_*/templatelinks (tl_from,tl_namespace,tl_title); |
| 116 | +CREATE UNIQUE INDEX /*i*/tl_namespace ON /*_*/templatelinks (tl_namespace,tl_title,tl_from); |
| 117 | +CREATE TABLE /*_*/imagelinks ( |
| 118 | + il_from int unsigned NOT NULL default 0, |
| 119 | + il_to varchar(255) binary NOT NULL default '' |
| 120 | +) /*$wgDBTableOptions*/; |
| 121 | +CREATE UNIQUE INDEX /*i*/il_from ON /*_*/imagelinks (il_from,il_to); |
| 122 | +CREATE UNIQUE INDEX /*i*/il_to ON /*_*/imagelinks (il_to,il_from); |
| 123 | +CREATE TABLE /*_*/categorylinks ( |
| 124 | + cl_from int unsigned NOT NULL default 0, |
| 125 | + cl_to varchar(255) binary NOT NULL default '', |
| 126 | + cl_sortkey varchar(70) binary NOT NULL default '', |
| 127 | + cl_timestamp timestamp NOT NULL |
| 128 | +) /*$wgDBTableOptions*/; |
| 129 | +CREATE UNIQUE INDEX /*i*/cl_from ON /*_*/categorylinks (cl_from,cl_to); |
| 130 | +CREATE INDEX /*i*/cl_sortkey ON /*_*/categorylinks (cl_to,cl_sortkey,cl_from); |
| 131 | +CREATE INDEX /*i*/cl_timestamp ON /*_*/categorylinks (cl_to,cl_timestamp); |
| 132 | +CREATE TABLE /*_*/category ( |
| 133 | + cat_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 134 | + cat_title varchar(255) binary NOT NULL, |
| 135 | + cat_pages int signed NOT NULL default 0, |
| 136 | + cat_subcats int signed NOT NULL default 0, |
| 137 | + cat_files int signed NOT NULL default 0, |
| 138 | + cat_hidden tinyint unsigned NOT NULL default 0 |
| 139 | +) /*$wgDBTableOptions*/; |
| 140 | +CREATE UNIQUE INDEX /*i*/cat_title ON /*_*/category (cat_title); |
| 141 | +CREATE INDEX /*i*/cat_pages ON /*_*/category (cat_pages); |
| 142 | +CREATE TABLE /*_*/externallinks ( |
| 143 | + el_from int unsigned NOT NULL default 0, |
| 144 | + el_to blob NOT NULL, |
| 145 | + el_index blob NOT NULL |
| 146 | +) /*$wgDBTableOptions*/; |
| 147 | +CREATE INDEX /*i*/el_from ON /*_*/externallinks (el_from, el_to(40)); |
| 148 | +CREATE INDEX /*i*/el_to ON /*_*/externallinks (el_to(60), el_from); |
| 149 | +CREATE INDEX /*i*/el_index ON /*_*/externallinks (el_index(60)); |
| 150 | +CREATE TABLE /*_*/external_user ( |
| 151 | + eu_local_id int unsigned NOT NULL PRIMARY KEY, |
| 152 | + eu_external_id varchar(255) binary NOT NULL |
| 153 | +) /*$wgDBTableOptions*/; |
| 154 | +CREATE UNIQUE INDEX /*i*/eu_external_id ON /*_*/external_user (eu_external_id); |
| 155 | +CREATE TABLE /*_*/langlinks ( |
| 156 | + ll_from int unsigned NOT NULL default 0, |
| 157 | + ll_lang varbinary(20) NOT NULL default '', |
| 158 | + ll_title varchar(255) binary NOT NULL default '' |
| 159 | +) /*$wgDBTableOptions*/; |
| 160 | +CREATE UNIQUE INDEX /*i*/ll_from ON /*_*/langlinks (ll_from, ll_lang); |
| 161 | +CREATE INDEX /*i*/ll_lang ON /*_*/langlinks (ll_lang, ll_title); |
| 162 | +CREATE TABLE /*_*/site_stats ( |
| 163 | + ss_row_id int unsigned NOT NULL, |
| 164 | + ss_total_views bigint unsigned default 0, |
| 165 | + ss_total_edits bigint unsigned default 0, |
| 166 | + ss_good_articles bigint unsigned default 0, |
| 167 | + ss_total_pages bigint default '-1', |
| 168 | + ss_users bigint default '-1', |
| 169 | + ss_active_users bigint default '-1', |
| 170 | + ss_admins int default '-1', |
| 171 | + ss_images int default 0 |
| 172 | +) /*$wgDBTableOptions*/; |
| 173 | +CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id); |
| 174 | +CREATE TABLE /*_*/hitcounter ( |
| 175 | + hc_id int unsigned NOT NULL |
| 176 | +) ENGINE=HEAP MAX_ROWS=25000; |
| 177 | +CREATE TABLE /*_*/ipblocks ( |
| 178 | + ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 179 | + ipb_address tinyblob NOT NULL, |
| 180 | + ipb_user int unsigned NOT NULL default 0, |
| 181 | + ipb_by int unsigned NOT NULL default 0, |
| 182 | + ipb_by_text varchar(255) binary NOT NULL default '', |
| 183 | + ipb_reason tinyblob NOT NULL, |
| 184 | + ipb_timestamp binary(14) NOT NULL default '', |
| 185 | + ipb_auto bool NOT NULL default 0, |
| 186 | + ipb_anon_only bool NOT NULL default 0, |
| 187 | + ipb_create_account bool NOT NULL default 1, |
| 188 | + ipb_enable_autoblock bool NOT NULL default '1', |
| 189 | + ipb_expiry varbinary(14) NOT NULL default '', |
| 190 | + ipb_range_start tinyblob NOT NULL, |
| 191 | + ipb_range_end tinyblob NOT NULL, |
| 192 | + ipb_deleted bool NOT NULL default 0, |
| 193 | + ipb_block_email bool NOT NULL default 0, |
| 194 | + ipb_allow_usertalk bool NOT NULL default 0 |
| 195 | +) /*$wgDBTableOptions*/; |
| 196 | +CREATE UNIQUE INDEX /*i*/ipb_address ON /*_*/ipblocks (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only); |
| 197 | +CREATE INDEX /*i*/ipb_user ON /*_*/ipblocks (ipb_user); |
| 198 | +CREATE INDEX /*i*/ipb_range ON /*_*/ipblocks (ipb_range_start(8), ipb_range_end(8)); |
| 199 | +CREATE INDEX /*i*/ipb_timestamp ON /*_*/ipblocks (ipb_timestamp); |
| 200 | +CREATE INDEX /*i*/ipb_expiry ON /*_*/ipblocks (ipb_expiry); |
| 201 | +CREATE TABLE /*_*/image ( |
| 202 | + img_name varchar(255) binary NOT NULL default '' PRIMARY KEY, |
| 203 | + img_size int unsigned NOT NULL default 0, |
| 204 | + img_width int NOT NULL default 0, |
| 205 | + img_height int NOT NULL default 0, |
| 206 | + img_metadata mediumblob NOT NULL, |
| 207 | + img_bits int NOT NULL default 0, |
| 208 | + img_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 209 | + img_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown", |
| 210 | + img_minor_mime varbinary(100) NOT NULL default "unknown", |
| 211 | + img_description tinyblob NOT NULL, |
| 212 | + img_user int unsigned NOT NULL default 0, |
| 213 | + img_user_text varchar(255) binary NOT NULL, |
| 214 | + img_timestamp varbinary(14) NOT NULL default '', |
| 215 | + img_sha1 varbinary(32) NOT NULL default '' |
| 216 | +) /*$wgDBTableOptions*/; |
| 217 | +CREATE INDEX /*i*/img_usertext_timestamp ON /*_*/image (img_user_text,img_timestamp); |
| 218 | +CREATE INDEX /*i*/img_size ON /*_*/image (img_size); |
| 219 | +CREATE INDEX /*i*/img_timestamp ON /*_*/image (img_timestamp); |
| 220 | +CREATE INDEX /*i*/img_sha1 ON /*_*/image (img_sha1); |
| 221 | +CREATE TABLE /*_*/oldimage ( |
| 222 | + oi_name varchar(255) binary NOT NULL default '', |
| 223 | + oi_archive_name varchar(255) binary NOT NULL default '', |
| 224 | + oi_size int unsigned NOT NULL default 0, |
| 225 | + oi_width int NOT NULL default 0, |
| 226 | + oi_height int NOT NULL default 0, |
| 227 | + oi_bits int NOT NULL default 0, |
| 228 | + oi_description tinyblob NOT NULL, |
| 229 | + oi_user int unsigned NOT NULL default 0, |
| 230 | + oi_user_text varchar(255) binary NOT NULL, |
| 231 | + oi_timestamp binary(14) NOT NULL default '', |
| 232 | + oi_metadata mediumblob NOT NULL, |
| 233 | + oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 234 | + oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown", |
| 235 | + oi_minor_mime varbinary(100) NOT NULL default "unknown", |
| 236 | + oi_deleted tinyint unsigned NOT NULL default 0, |
| 237 | + oi_sha1 varbinary(32) NOT NULL default '' |
| 238 | +) /*$wgDBTableOptions*/; |
| 239 | +CREATE INDEX /*i*/oi_usertext_timestamp ON /*_*/oldimage (oi_user_text,oi_timestamp); |
| 240 | +CREATE INDEX /*i*/oi_name_timestamp ON /*_*/oldimage (oi_name,oi_timestamp); |
| 241 | +CREATE INDEX /*i*/oi_name_archive_name ON /*_*/oldimage (oi_name,oi_archive_name(14)); |
| 242 | +CREATE INDEX /*i*/oi_sha1 ON /*_*/oldimage (oi_sha1); |
| 243 | +CREATE TABLE /*_*/filearchive ( |
| 244 | + fa_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 245 | + fa_name varchar(255) binary NOT NULL default '', |
| 246 | + fa_archive_name varchar(255) binary default '', |
| 247 | + fa_storage_group varbinary(16), |
| 248 | + fa_storage_key varbinary(64) default '', |
| 249 | + fa_deleted_user int, |
| 250 | + fa_deleted_timestamp binary(14) default '', |
| 251 | + fa_deleted_reason text, |
| 252 | + fa_size int unsigned default 0, |
| 253 | + fa_width int default 0, |
| 254 | + fa_height int default 0, |
| 255 | + fa_metadata mediumblob, |
| 256 | + fa_bits int default 0, |
| 257 | + fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 258 | + fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") default "unknown", |
| 259 | + fa_minor_mime varbinary(100) default "unknown", |
| 260 | + fa_description tinyblob, |
| 261 | + fa_user int unsigned default 0, |
| 262 | + fa_user_text varchar(255) binary, |
| 263 | + fa_timestamp binary(14) default '', |
| 264 | + fa_deleted tinyint unsigned NOT NULL default 0 |
| 265 | +) /*$wgDBTableOptions*/; |
| 266 | +CREATE INDEX /*i*/fa_name ON /*_*/filearchive (fa_name, fa_timestamp); |
| 267 | +CREATE INDEX /*i*/fa_storage_group ON /*_*/filearchive (fa_storage_group, fa_storage_key); |
| 268 | +CREATE INDEX /*i*/fa_deleted_timestamp ON /*_*/filearchive (fa_deleted_timestamp); |
| 269 | +CREATE INDEX /*i*/fa_user_timestamp ON /*_*/filearchive (fa_user_text,fa_timestamp); |
| 270 | +CREATE TABLE /*_*/recentchanges ( |
| 271 | + rc_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 272 | + rc_timestamp varbinary(14) NOT NULL default '', |
| 273 | + rc_cur_time varbinary(14) NOT NULL default '', |
| 274 | + rc_user int unsigned NOT NULL default 0, |
| 275 | + rc_user_text varchar(255) binary NOT NULL, |
| 276 | + rc_namespace int NOT NULL default 0, |
| 277 | + rc_title varchar(255) binary NOT NULL default '', |
| 278 | + rc_comment varchar(255) binary NOT NULL default '', |
| 279 | + rc_minor tinyint unsigned NOT NULL default 0, |
| 280 | + rc_bot tinyint unsigned NOT NULL default 0, |
| 281 | + rc_new tinyint unsigned NOT NULL default 0, |
| 282 | + rc_cur_id int unsigned NOT NULL default 0, |
| 283 | + rc_this_oldid int unsigned NOT NULL default 0, |
| 284 | + rc_last_oldid int unsigned NOT NULL default 0, |
| 285 | + rc_type tinyint unsigned NOT NULL default 0, |
| 286 | + rc_moved_to_ns tinyint unsigned NOT NULL default 0, |
| 287 | + rc_moved_to_title varchar(255) binary NOT NULL default '', |
| 288 | + rc_patrolled tinyint unsigned NOT NULL default 0, |
| 289 | + rc_ip varbinary(40) NOT NULL default '', |
| 290 | + rc_old_len int, |
| 291 | + rc_new_len int, |
| 292 | + rc_deleted tinyint unsigned NOT NULL default 0, |
| 293 | + rc_logid int unsigned NOT NULL default 0, |
| 294 | + rc_log_type varbinary(255) NULL default NULL, |
| 295 | + rc_log_action varbinary(255) NULL default NULL, |
| 296 | + rc_params blob NULL |
| 297 | +) /*$wgDBTableOptions*/; |
| 298 | +CREATE INDEX /*i*/rc_timestamp ON /*_*/recentchanges (rc_timestamp); |
| 299 | +CREATE INDEX /*i*/rc_namespace_title ON /*_*/recentchanges (rc_namespace, rc_title); |
| 300 | +CREATE INDEX /*i*/rc_cur_id ON /*_*/recentchanges (rc_cur_id); |
| 301 | +CREATE INDEX /*i*/new_name_timestamp ON /*_*/recentchanges (rc_new,rc_namespace,rc_timestamp); |
| 302 | +CREATE INDEX /*i*/rc_ip ON /*_*/recentchanges (rc_ip); |
| 303 | +CREATE INDEX /*i*/rc_ns_usertext ON /*_*/recentchanges (rc_namespace, rc_user_text); |
| 304 | +CREATE INDEX /*i*/rc_user_text ON /*_*/recentchanges (rc_user_text, rc_timestamp); |
| 305 | +CREATE TABLE /*_*/watchlist ( |
| 306 | + wl_user int unsigned NOT NULL, |
| 307 | + wl_namespace int NOT NULL default 0, |
| 308 | + wl_title varchar(255) binary NOT NULL default '', |
| 309 | + wl_notificationtimestamp varbinary(14) |
| 310 | +) /*$wgDBTableOptions*/; |
| 311 | +CREATE UNIQUE INDEX /*i*/wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title); |
| 312 | +CREATE INDEX /*i*/namespace_title ON /*_*/watchlist (wl_namespace, wl_title); |
| 313 | +CREATE TABLE /*_*/math ( |
| 314 | + math_inputhash varbinary(16) NOT NULL, |
| 315 | + math_outputhash varbinary(16) NOT NULL, |
| 316 | + math_html_conservativeness tinyint NOT NULL, |
| 317 | + math_html text, |
| 318 | + math_mathml text |
| 319 | +) /*$wgDBTableOptions*/; |
| 320 | +CREATE UNIQUE INDEX /*i*/math_inputhash ON /*_*/math (math_inputhash); |
| 321 | +CREATE TABLE /*_*/searchindex ( |
| 322 | + si_page int unsigned NOT NULL, |
| 323 | + si_title varchar(255) NOT NULL default '', |
| 324 | + si_text mediumtext NOT NULL |
| 325 | +) ENGINE=MyISAM; |
| 326 | +CREATE UNIQUE INDEX /*i*/si_page ON /*_*/searchindex (si_page); |
| 327 | +CREATE FULLTEXT INDEX /*i*/si_title ON /*_*/searchindex (si_title); |
| 328 | +CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text); |
| 329 | +CREATE TABLE /*_*/interwiki ( |
| 330 | + iw_prefix varchar(32) NOT NULL, |
| 331 | + iw_url blob NOT NULL, |
| 332 | + iw_local bool NOT NULL, |
| 333 | + iw_trans tinyint NOT NULL default 0 |
| 334 | +) /*$wgDBTableOptions*/; |
| 335 | +CREATE UNIQUE INDEX /*i*/iw_prefix ON /*_*/interwiki (iw_prefix); |
| 336 | +CREATE TABLE /*_*/querycache ( |
| 337 | + qc_type varbinary(32) NOT NULL, |
| 338 | + qc_value int unsigned NOT NULL default 0, |
| 339 | + qc_namespace int NOT NULL default 0, |
| 340 | + qc_title varchar(255) binary NOT NULL default '' |
| 341 | +) /*$wgDBTableOptions*/; |
| 342 | +CREATE INDEX /*i*/qc_type ON /*_*/querycache (qc_type,qc_value); |
| 343 | +CREATE TABLE /*_*/objectcache ( |
| 344 | + keyname varbinary(255) NOT NULL default '' PRIMARY KEY, |
| 345 | + value mediumblob, |
| 346 | + exptime datetime |
| 347 | +) /*$wgDBTableOptions*/; |
| 348 | +CREATE INDEX /*i*/exptime ON /*_*/objectcache (exptime); |
| 349 | +CREATE TABLE /*_*/transcache ( |
| 350 | + tc_url varbinary(255) NOT NULL, |
| 351 | + tc_contents text, |
| 352 | + tc_time binary(14) NOT NULL |
| 353 | +) /*$wgDBTableOptions*/; |
| 354 | +CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url); |
| 355 | +CREATE TABLE /*_*/logging ( |
| 356 | + log_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 357 | + log_type varbinary(32) NOT NULL default '', |
| 358 | + log_action varbinary(32) NOT NULL default '', |
| 359 | + log_timestamp binary(14) NOT NULL default '19700101000000', |
| 360 | + log_user int unsigned NOT NULL default 0, |
| 361 | + log_user_text varchar(255) binary NOT NULL default '', |
| 362 | + log_namespace int NOT NULL default 0, |
| 363 | + log_title varchar(255) binary NOT NULL default '', |
| 364 | + log_page int unsigned NULL, |
| 365 | + log_comment varchar(255) NOT NULL default '', |
| 366 | + log_params blob NOT NULL, |
| 367 | + log_deleted tinyint unsigned NOT NULL default 0 |
| 368 | +) /*$wgDBTableOptions*/; |
| 369 | +CREATE INDEX /*i*/type_time ON /*_*/logging (log_type, log_timestamp); |
| 370 | +CREATE INDEX /*i*/user_time ON /*_*/logging (log_user, log_timestamp); |
| 371 | +CREATE INDEX /*i*/page_time ON /*_*/logging (log_namespace, log_title, log_timestamp); |
| 372 | +CREATE INDEX /*i*/times ON /*_*/logging (log_timestamp); |
| 373 | +CREATE INDEX /*i*/log_user_type_time ON /*_*/logging (log_user, log_type, log_timestamp); |
| 374 | +CREATE INDEX /*i*/log_page_id_time ON /*_*/logging (log_page,log_timestamp); |
| 375 | +CREATE TABLE /*_*/log_search ( |
| 376 | + ls_field varbinary(32) NOT NULL, |
| 377 | + ls_value varchar(255) NOT NULL, |
| 378 | + ls_log_id int unsigned NOT NULL default 0 |
| 379 | +) /*$wgDBTableOptions*/; |
| 380 | +CREATE UNIQUE INDEX /*i*/ls_field_val ON /*_*/log_search (ls_field,ls_value,ls_log_id); |
| 381 | +CREATE INDEX /*i*/ls_log_id ON /*_*/log_search (ls_log_id); |
| 382 | +CREATE TABLE /*_*/trackbacks ( |
| 383 | + tb_id int PRIMARY KEY AUTO_INCREMENT, |
| 384 | + tb_page int REFERENCES /*_*/page(page_id) ON DELETE CASCADE, |
| 385 | + tb_title varchar(255) NOT NULL, |
| 386 | + tb_url blob NOT NULL, |
| 387 | + tb_ex text, |
| 388 | + tb_name varchar(255) |
| 389 | +) /*$wgDBTableOptions*/; |
| 390 | +CREATE INDEX /*i*/tb_page ON /*_*/trackbacks (tb_page); |
| 391 | +CREATE TABLE /*_*/job ( |
| 392 | + job_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 393 | + job_cmd varbinary(60) NOT NULL default '', |
| 394 | + job_namespace int NOT NULL, |
| 395 | + job_title varchar(255) binary NOT NULL, |
| 396 | + job_params blob NOT NULL |
| 397 | +) /*$wgDBTableOptions*/; |
| 398 | +CREATE INDEX /*i*/job_cmd ON /*_*/job (job_cmd, job_namespace, job_title, job_params(128)); |
| 399 | +CREATE TABLE /*_*/querycache_info ( |
| 400 | + qci_type varbinary(32) NOT NULL default '', |
| 401 | + qci_timestamp binary(14) NOT NULL default '19700101000000' |
| 402 | +) /*$wgDBTableOptions*/; |
| 403 | +CREATE UNIQUE INDEX /*i*/qci_type ON /*_*/querycache_info (qci_type); |
| 404 | +CREATE TABLE /*_*/redirect ( |
| 405 | + rd_from int unsigned NOT NULL default 0 PRIMARY KEY, |
| 406 | + rd_namespace int NOT NULL default 0, |
| 407 | + rd_title varchar(255) binary NOT NULL default '', |
| 408 | + rd_interwiki varchar(32) default NULL, |
| 409 | + rd_fragment varchar(255) binary default NULL |
| 410 | +) /*$wgDBTableOptions*/; |
| 411 | +CREATE INDEX /*i*/rd_ns_title ON /*_*/redirect (rd_namespace,rd_title,rd_from); |
| 412 | +CREATE TABLE /*_*/querycachetwo ( |
| 413 | + qcc_type varbinary(32) NOT NULL, |
| 414 | + qcc_value int unsigned NOT NULL default 0, |
| 415 | + qcc_namespace int NOT NULL default 0, |
| 416 | + qcc_title varchar(255) binary NOT NULL default '', |
| 417 | + qcc_namespacetwo int NOT NULL default 0, |
| 418 | + qcc_titletwo varchar(255) binary NOT NULL default '' |
| 419 | +) /*$wgDBTableOptions*/; |
| 420 | +CREATE INDEX /*i*/qcc_type ON /*_*/querycachetwo (qcc_type,qcc_value); |
| 421 | +CREATE INDEX /*i*/qcc_title ON /*_*/querycachetwo (qcc_type,qcc_namespace,qcc_title); |
| 422 | +CREATE INDEX /*i*/qcc_titletwo ON /*_*/querycachetwo (qcc_type,qcc_namespacetwo,qcc_titletwo); |
| 423 | +CREATE TABLE /*_*/page_restrictions ( |
| 424 | + pr_page int NOT NULL, |
| 425 | + pr_type varbinary(60) NOT NULL, |
| 426 | + pr_level varbinary(60) NOT NULL, |
| 427 | + pr_cascade tinyint NOT NULL, |
| 428 | + pr_user int NULL, |
| 429 | + pr_expiry varbinary(14) NULL, |
| 430 | + pr_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT |
| 431 | +) /*$wgDBTableOptions*/; |
| 432 | +CREATE UNIQUE INDEX /*i*/pr_pagetype ON /*_*/page_restrictions (pr_page,pr_type); |
| 433 | +CREATE INDEX /*i*/pr_typelevel ON /*_*/page_restrictions (pr_type,pr_level); |
| 434 | +CREATE INDEX /*i*/pr_level ON /*_*/page_restrictions (pr_level); |
| 435 | +CREATE INDEX /*i*/pr_cascade ON /*_*/page_restrictions (pr_cascade); |
| 436 | +CREATE TABLE /*_*/protected_titles ( |
| 437 | + pt_namespace int NOT NULL, |
| 438 | + pt_title varchar(255) binary NOT NULL, |
| 439 | + pt_user int unsigned NOT NULL, |
| 440 | + pt_reason tinyblob, |
| 441 | + pt_timestamp binary(14) NOT NULL, |
| 442 | + pt_expiry varbinary(14) NOT NULL default '', |
| 443 | + pt_create_perm varbinary(60) NOT NULL |
| 444 | +) /*$wgDBTableOptions*/; |
| 445 | +CREATE UNIQUE INDEX /*i*/pt_namespace_title ON /*_*/protected_titles (pt_namespace,pt_title); |
| 446 | +CREATE INDEX /*i*/pt_timestamp ON /*_*/protected_titles (pt_timestamp); |
| 447 | +CREATE TABLE /*_*/page_props ( |
| 448 | + pp_page int NOT NULL, |
| 449 | + pp_propname varbinary(60) NOT NULL, |
| 450 | + pp_value blob NOT NULL |
| 451 | +) /*$wgDBTableOptions*/; |
| 452 | +CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname); |
| 453 | +CREATE TABLE /*_*/updatelog ( |
| 454 | + ul_key varchar(255) NOT NULL PRIMARY KEY |
| 455 | +) /*$wgDBTableOptions*/; |
| 456 | +CREATE TABLE /*_*/change_tag ( |
| 457 | + ct_rc_id int NULL, |
| 458 | + ct_log_id int NULL, |
| 459 | + ct_rev_id int NULL, |
| 460 | + ct_tag varchar(255) NOT NULL, |
| 461 | + ct_params blob NULL |
| 462 | +) /*$wgDBTableOptions*/; |
| 463 | +CREATE UNIQUE INDEX /*i*/change_tag_rc_tag ON /*_*/change_tag (ct_rc_id,ct_tag); |
| 464 | +CREATE UNIQUE INDEX /*i*/change_tag_log_tag ON /*_*/change_tag (ct_log_id,ct_tag); |
| 465 | +CREATE UNIQUE INDEX /*i*/change_tag_rev_tag ON /*_*/change_tag (ct_rev_id,ct_tag); |
| 466 | +CREATE INDEX /*i*/change_tag_tag_id ON /*_*/change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id); |
| 467 | +CREATE TABLE /*_*/tag_summary ( |
| 468 | + ts_rc_id int NULL, |
| 469 | + ts_log_id int NULL, |
| 470 | + ts_rev_id int NULL, |
| 471 | + ts_tags blob NOT NULL |
| 472 | +) /*$wgDBTableOptions*/; |
| 473 | +CREATE UNIQUE INDEX /*i*/tag_summary_rc_id ON /*_*/tag_summary (ts_rc_id); |
| 474 | +CREATE UNIQUE INDEX /*i*/tag_summary_log_id ON /*_*/tag_summary (ts_log_id); |
| 475 | +CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id); |
| 476 | +CREATE TABLE /*_*/valid_tag ( |
| 477 | + vt_tag varchar(255) NOT NULL PRIMARY KEY |
| 478 | +) /*$wgDBTableOptions*/; |
| 479 | +CREATE TABLE /*_*/l10n_cache ( |
| 480 | + lc_lang varbinary(32) NOT NULL, |
| 481 | + lc_key varchar(255) NOT NULL, |
| 482 | + lc_value mediumblob NOT NULL |
| 483 | +) /*$wgDBTableOptions*/; |
| 484 | +CREATE INDEX /*i*/lc_lang_key ON /*_*/l10n_cache (lc_lang, lc_key); |
Property changes on: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.16.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 485 | + native |
Index: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.17.sql |
— | — | @@ -0,0 +1,516 @@ |
| 2 | +-- This is a copy of MediaWiki 1.17 schema shared by MySQL and SQLite. |
| 3 | +-- It is used for updater testing. Comments are stripped to decrease |
| 4 | +-- file size, as we don't need to maintain it. |
| 5 | + |
| 6 | +CREATE TABLE /*_*/user ( |
| 7 | + user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 8 | + user_name varchar(255) binary NOT NULL default '', |
| 9 | + user_real_name varchar(255) binary NOT NULL default '', |
| 10 | + user_password tinyblob NOT NULL, |
| 11 | + user_newpassword tinyblob NOT NULL, |
| 12 | + user_newpass_time binary(14), |
| 13 | + user_email tinytext NOT NULL, |
| 14 | + user_options blob NOT NULL, |
| 15 | + user_touched binary(14) NOT NULL default '', |
| 16 | + user_token binary(32) NOT NULL default '', |
| 17 | + user_email_authenticated binary(14), |
| 18 | + user_email_token binary(32), |
| 19 | + user_email_token_expires binary(14), |
| 20 | + user_registration binary(14), |
| 21 | + user_editcount int |
| 22 | +) /*$wgDBTableOptions*/; |
| 23 | +CREATE UNIQUE INDEX /*i*/user_name ON /*_*/user (user_name); |
| 24 | +CREATE INDEX /*i*/user_email_token ON /*_*/user (user_email_token); |
| 25 | +CREATE TABLE /*_*/user_groups ( |
| 26 | + ug_user int unsigned NOT NULL default 0, |
| 27 | + ug_group varbinary(16) NOT NULL default '' |
| 28 | +) /*$wgDBTableOptions*/; |
| 29 | +CREATE UNIQUE INDEX /*i*/ug_user_group ON /*_*/user_groups (ug_user,ug_group); |
| 30 | +CREATE INDEX /*i*/ug_group ON /*_*/user_groups (ug_group); |
| 31 | +CREATE TABLE /*_*/user_newtalk ( |
| 32 | + user_id int NOT NULL default 0, |
| 33 | + user_ip varbinary(40) NOT NULL default '', |
| 34 | + user_last_timestamp binary(14) NOT NULL default '' |
| 35 | +) /*$wgDBTableOptions*/; |
| 36 | +CREATE INDEX /*i*/un_user_id ON /*_*/user_newtalk (user_id); |
| 37 | +CREATE INDEX /*i*/un_user_ip ON /*_*/user_newtalk (user_ip); |
| 38 | +CREATE TABLE /*_*/user_properties ( |
| 39 | + up_user int NOT NULL, |
| 40 | + up_property varbinary(32) NOT NULL, |
| 41 | + up_value blob |
| 42 | +) /*$wgDBTableOptions*/; |
| 43 | +CREATE UNIQUE INDEX /*i*/user_properties_user_property ON /*_*/user_properties (up_user,up_property); |
| 44 | +CREATE INDEX /*i*/user_properties_property ON /*_*/user_properties (up_property); |
| 45 | +CREATE TABLE /*_*/page ( |
| 46 | + page_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 47 | + page_namespace int NOT NULL, |
| 48 | + page_title varchar(255) binary NOT NULL, |
| 49 | + page_restrictions tinyblob NOT NULL, |
| 50 | + page_counter bigint unsigned NOT NULL default 0, |
| 51 | + page_is_redirect tinyint unsigned NOT NULL default 0, |
| 52 | + page_is_new tinyint unsigned NOT NULL default 0, |
| 53 | + page_random real unsigned NOT NULL, |
| 54 | + page_touched binary(14) NOT NULL default '', |
| 55 | + page_latest int unsigned NOT NULL, |
| 56 | + page_len int unsigned NOT NULL |
| 57 | +) /*$wgDBTableOptions*/; |
| 58 | +CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title); |
| 59 | +CREATE INDEX /*i*/page_random ON /*_*/page (page_random); |
| 60 | +CREATE INDEX /*i*/page_len ON /*_*/page (page_len); |
| 61 | +CREATE TABLE /*_*/revision ( |
| 62 | + rev_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 63 | + rev_page int unsigned NOT NULL, |
| 64 | + rev_text_id int unsigned NOT NULL, |
| 65 | + rev_comment tinyblob NOT NULL, |
| 66 | + rev_user int unsigned NOT NULL default 0, |
| 67 | + rev_user_text varchar(255) binary NOT NULL default '', |
| 68 | + rev_timestamp binary(14) NOT NULL default '', |
| 69 | + rev_minor_edit tinyint unsigned NOT NULL default 0, |
| 70 | + rev_deleted tinyint unsigned NOT NULL default 0, |
| 71 | + rev_len int unsigned, |
| 72 | + rev_parent_id int unsigned default NULL |
| 73 | +) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024; |
| 74 | +CREATE UNIQUE INDEX /*i*/rev_page_id ON /*_*/revision (rev_page, rev_id); |
| 75 | +CREATE INDEX /*i*/rev_timestamp ON /*_*/revision (rev_timestamp); |
| 76 | +CREATE INDEX /*i*/page_timestamp ON /*_*/revision (rev_page,rev_timestamp); |
| 77 | +CREATE INDEX /*i*/user_timestamp ON /*_*/revision (rev_user,rev_timestamp); |
| 78 | +CREATE INDEX /*i*/usertext_timestamp ON /*_*/revision (rev_user_text,rev_timestamp); |
| 79 | +CREATE TABLE /*_*/text ( |
| 80 | + old_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 81 | + old_text mediumblob NOT NULL, |
| 82 | + old_flags tinyblob NOT NULL |
| 83 | +) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=10240; |
| 84 | +CREATE TABLE /*_*/archive ( |
| 85 | + ar_namespace int NOT NULL default 0, |
| 86 | + ar_title varchar(255) binary NOT NULL default '', |
| 87 | + ar_text mediumblob NOT NULL, |
| 88 | + ar_comment tinyblob NOT NULL, |
| 89 | + ar_user int unsigned NOT NULL default 0, |
| 90 | + ar_user_text varchar(255) binary NOT NULL, |
| 91 | + ar_timestamp binary(14) NOT NULL default '', |
| 92 | + ar_minor_edit tinyint NOT NULL default 0, |
| 93 | + ar_flags tinyblob NOT NULL, |
| 94 | + ar_rev_id int unsigned, |
| 95 | + ar_text_id int unsigned, |
| 96 | + ar_deleted tinyint unsigned NOT NULL default 0, |
| 97 | + ar_len int unsigned, |
| 98 | + ar_page_id int unsigned, |
| 99 | + ar_parent_id int unsigned default NULL |
| 100 | +) /*$wgDBTableOptions*/; |
| 101 | +CREATE INDEX /*i*/name_title_timestamp ON /*_*/archive (ar_namespace,ar_title,ar_timestamp); |
| 102 | +CREATE INDEX /*i*/ar_usertext_timestamp ON /*_*/archive (ar_user_text,ar_timestamp); |
| 103 | +CREATE INDEX /*i*/ar_revid ON /*_*/archive (ar_rev_id); |
| 104 | +CREATE TABLE /*_*/pagelinks ( |
| 105 | + pl_from int unsigned NOT NULL default 0, |
| 106 | + pl_namespace int NOT NULL default 0, |
| 107 | + pl_title varchar(255) binary NOT NULL default '' |
| 108 | +) /*$wgDBTableOptions*/; |
| 109 | +CREATE UNIQUE INDEX /*i*/pl_from ON /*_*/pagelinks (pl_from,pl_namespace,pl_title); |
| 110 | +CREATE UNIQUE INDEX /*i*/pl_namespace ON /*_*/pagelinks (pl_namespace,pl_title,pl_from); |
| 111 | +CREATE TABLE /*_*/templatelinks ( |
| 112 | + tl_from int unsigned NOT NULL default 0, |
| 113 | + tl_namespace int NOT NULL default 0, |
| 114 | + tl_title varchar(255) binary NOT NULL default '' |
| 115 | +) /*$wgDBTableOptions*/; |
| 116 | +CREATE UNIQUE INDEX /*i*/tl_from ON /*_*/templatelinks (tl_from,tl_namespace,tl_title); |
| 117 | +CREATE UNIQUE INDEX /*i*/tl_namespace ON /*_*/templatelinks (tl_namespace,tl_title,tl_from); |
| 118 | +CREATE TABLE /*_*/imagelinks ( |
| 119 | + il_from int unsigned NOT NULL default 0, |
| 120 | + il_to varchar(255) binary NOT NULL default '' |
| 121 | +) /*$wgDBTableOptions*/; |
| 122 | +CREATE UNIQUE INDEX /*i*/il_from ON /*_*/imagelinks (il_from,il_to); |
| 123 | +CREATE UNIQUE INDEX /*i*/il_to ON /*_*/imagelinks (il_to,il_from); |
| 124 | +CREATE TABLE /*_*/categorylinks ( |
| 125 | + cl_from int unsigned NOT NULL default 0, |
| 126 | + cl_to varchar(255) binary NOT NULL default '', |
| 127 | + cl_sortkey varbinary(230) NOT NULL default '', |
| 128 | + cl_sortkey_prefix varchar(255) binary NOT NULL default '', |
| 129 | + cl_timestamp timestamp NOT NULL, |
| 130 | + cl_collation varbinary(32) NOT NULL default '', |
| 131 | + cl_type ENUM('page', 'subcat', 'file') NOT NULL default 'page' |
| 132 | +) /*$wgDBTableOptions*/; |
| 133 | +CREATE UNIQUE INDEX /*i*/cl_from ON /*_*/categorylinks (cl_from,cl_to); |
| 134 | +CREATE INDEX /*i*/cl_sortkey ON /*_*/categorylinks (cl_to,cl_type,cl_sortkey,cl_from); |
| 135 | +CREATE INDEX /*i*/cl_timestamp ON /*_*/categorylinks (cl_to,cl_timestamp); |
| 136 | +CREATE INDEX /*i*/cl_collation ON /*_*/categorylinks (cl_collation); |
| 137 | +CREATE TABLE /*_*/category ( |
| 138 | + cat_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 139 | + cat_title varchar(255) binary NOT NULL, |
| 140 | + cat_pages int signed NOT NULL default 0, |
| 141 | + cat_subcats int signed NOT NULL default 0, |
| 142 | + cat_files int signed NOT NULL default 0, |
| 143 | + cat_hidden tinyint unsigned NOT NULL default 0 |
| 144 | +) /*$wgDBTableOptions*/; |
| 145 | +CREATE UNIQUE INDEX /*i*/cat_title ON /*_*/category (cat_title); |
| 146 | +CREATE INDEX /*i*/cat_pages ON /*_*/category (cat_pages); |
| 147 | +CREATE TABLE /*_*/externallinks ( |
| 148 | + el_from int unsigned NOT NULL default 0, |
| 149 | + el_to blob NOT NULL, |
| 150 | + el_index blob NOT NULL |
| 151 | +) /*$wgDBTableOptions*/; |
| 152 | +CREATE INDEX /*i*/el_from ON /*_*/externallinks (el_from, el_to(40)); |
| 153 | +CREATE INDEX /*i*/el_to ON /*_*/externallinks (el_to(60), el_from); |
| 154 | +CREATE INDEX /*i*/el_index ON /*_*/externallinks (el_index(60)); |
| 155 | +CREATE TABLE /*_*/external_user ( |
| 156 | + eu_local_id int unsigned NOT NULL PRIMARY KEY, |
| 157 | + eu_external_id varchar(255) binary NOT NULL |
| 158 | +) /*$wgDBTableOptions*/; |
| 159 | +CREATE UNIQUE INDEX /*i*/eu_external_id ON /*_*/external_user (eu_external_id); |
| 160 | +CREATE TABLE /*_*/langlinks ( |
| 161 | + ll_from int unsigned NOT NULL default 0, |
| 162 | + ll_lang varbinary(20) NOT NULL default '', |
| 163 | + ll_title varchar(255) binary NOT NULL default '' |
| 164 | +) /*$wgDBTableOptions*/; |
| 165 | +CREATE UNIQUE INDEX /*i*/ll_from ON /*_*/langlinks (ll_from, ll_lang); |
| 166 | +CREATE INDEX /*i*/ll_lang ON /*_*/langlinks (ll_lang, ll_title); |
| 167 | +CREATE TABLE /*_*/iwlinks ( |
| 168 | + iwl_from int unsigned NOT NULL default 0, |
| 169 | + iwl_prefix varbinary(20) NOT NULL default '', |
| 170 | + iwl_title varchar(255) binary NOT NULL default '' |
| 171 | +) /*$wgDBTableOptions*/; |
| 172 | +CREATE UNIQUE INDEX /*i*/iwl_from ON /*_*/iwlinks (iwl_from, iwl_prefix, iwl_title); |
| 173 | +CREATE UNIQUE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from); |
| 174 | +CREATE TABLE /*_*/site_stats ( |
| 175 | + ss_row_id int unsigned NOT NULL, |
| 176 | + ss_total_views bigint unsigned default 0, |
| 177 | + ss_total_edits bigint unsigned default 0, |
| 178 | + ss_good_articles bigint unsigned default 0, |
| 179 | + ss_total_pages bigint default '-1', |
| 180 | + ss_users bigint default '-1', |
| 181 | + ss_active_users bigint default '-1', |
| 182 | + ss_admins int default '-1', |
| 183 | + ss_images int default 0 |
| 184 | +) /*$wgDBTableOptions*/; |
| 185 | +CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id); |
| 186 | +CREATE TABLE /*_*/hitcounter ( |
| 187 | + hc_id int unsigned NOT NULL |
| 188 | +) ENGINE=HEAP MAX_ROWS=25000; |
| 189 | +CREATE TABLE /*_*/ipblocks ( |
| 190 | + ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 191 | + ipb_address tinyblob NOT NULL, |
| 192 | + ipb_user int unsigned NOT NULL default 0, |
| 193 | + ipb_by int unsigned NOT NULL default 0, |
| 194 | + ipb_by_text varchar(255) binary NOT NULL default '', |
| 195 | + ipb_reason tinyblob NOT NULL, |
| 196 | + ipb_timestamp binary(14) NOT NULL default '', |
| 197 | + ipb_auto bool NOT NULL default 0, |
| 198 | + ipb_anon_only bool NOT NULL default 0, |
| 199 | + ipb_create_account bool NOT NULL default 1, |
| 200 | + ipb_enable_autoblock bool NOT NULL default '1', |
| 201 | + ipb_expiry varbinary(14) NOT NULL default '', |
| 202 | + ipb_range_start tinyblob NOT NULL, |
| 203 | + ipb_range_end tinyblob NOT NULL, |
| 204 | + ipb_deleted bool NOT NULL default 0, |
| 205 | + ipb_block_email bool NOT NULL default 0, |
| 206 | + ipb_allow_usertalk bool NOT NULL default 0 |
| 207 | +) /*$wgDBTableOptions*/; |
| 208 | +CREATE UNIQUE INDEX /*i*/ipb_address ON /*_*/ipblocks (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only); |
| 209 | +CREATE INDEX /*i*/ipb_user ON /*_*/ipblocks (ipb_user); |
| 210 | +CREATE INDEX /*i*/ipb_range ON /*_*/ipblocks (ipb_range_start(8), ipb_range_end(8)); |
| 211 | +CREATE INDEX /*i*/ipb_timestamp ON /*_*/ipblocks (ipb_timestamp); |
| 212 | +CREATE INDEX /*i*/ipb_expiry ON /*_*/ipblocks (ipb_expiry); |
| 213 | +CREATE TABLE /*_*/image ( |
| 214 | + img_name varchar(255) binary NOT NULL default '' PRIMARY KEY, |
| 215 | + img_size int unsigned NOT NULL default 0, |
| 216 | + img_width int NOT NULL default 0, |
| 217 | + img_height int NOT NULL default 0, |
| 218 | + img_metadata mediumblob NOT NULL, |
| 219 | + img_bits int NOT NULL default 0, |
| 220 | + img_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 221 | + img_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown", |
| 222 | + img_minor_mime varbinary(100) NOT NULL default "unknown", |
| 223 | + img_description tinyblob NOT NULL, |
| 224 | + img_user int unsigned NOT NULL default 0, |
| 225 | + img_user_text varchar(255) binary NOT NULL, |
| 226 | + img_timestamp varbinary(14) NOT NULL default '', |
| 227 | + img_sha1 varbinary(32) NOT NULL default '' |
| 228 | +) /*$wgDBTableOptions*/; |
| 229 | +CREATE INDEX /*i*/img_usertext_timestamp ON /*_*/image (img_user_text,img_timestamp); |
| 230 | +CREATE INDEX /*i*/img_size ON /*_*/image (img_size); |
| 231 | +CREATE INDEX /*i*/img_timestamp ON /*_*/image (img_timestamp); |
| 232 | +CREATE INDEX /*i*/img_sha1 ON /*_*/image (img_sha1); |
| 233 | +CREATE TABLE /*_*/oldimage ( |
| 234 | + oi_name varchar(255) binary NOT NULL default '', |
| 235 | + oi_archive_name varchar(255) binary NOT NULL default '', |
| 236 | + oi_size int unsigned NOT NULL default 0, |
| 237 | + oi_width int NOT NULL default 0, |
| 238 | + oi_height int NOT NULL default 0, |
| 239 | + oi_bits int NOT NULL default 0, |
| 240 | + oi_description tinyblob NOT NULL, |
| 241 | + oi_user int unsigned NOT NULL default 0, |
| 242 | + oi_user_text varchar(255) binary NOT NULL, |
| 243 | + oi_timestamp binary(14) NOT NULL default '', |
| 244 | + oi_metadata mediumblob NOT NULL, |
| 245 | + oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 246 | + oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown", |
| 247 | + oi_minor_mime varbinary(100) NOT NULL default "unknown", |
| 248 | + oi_deleted tinyint unsigned NOT NULL default 0, |
| 249 | + oi_sha1 varbinary(32) NOT NULL default '' |
| 250 | +) /*$wgDBTableOptions*/; |
| 251 | +CREATE INDEX /*i*/oi_usertext_timestamp ON /*_*/oldimage (oi_user_text,oi_timestamp); |
| 252 | +CREATE INDEX /*i*/oi_name_timestamp ON /*_*/oldimage (oi_name,oi_timestamp); |
| 253 | +CREATE INDEX /*i*/oi_name_archive_name ON /*_*/oldimage (oi_name,oi_archive_name(14)); |
| 254 | +CREATE INDEX /*i*/oi_sha1 ON /*_*/oldimage (oi_sha1); |
| 255 | +CREATE TABLE /*_*/filearchive ( |
| 256 | + fa_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 257 | + fa_name varchar(255) binary NOT NULL default '', |
| 258 | + fa_archive_name varchar(255) binary default '', |
| 259 | + fa_storage_group varbinary(16), |
| 260 | + fa_storage_key varbinary(64) default '', |
| 261 | + fa_deleted_user int, |
| 262 | + fa_deleted_timestamp binary(14) default '', |
| 263 | + fa_deleted_reason text, |
| 264 | + fa_size int unsigned default 0, |
| 265 | + fa_width int default 0, |
| 266 | + fa_height int default 0, |
| 267 | + fa_metadata mediumblob, |
| 268 | + fa_bits int default 0, |
| 269 | + fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 270 | + fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") default "unknown", |
| 271 | + fa_minor_mime varbinary(100) default "unknown", |
| 272 | + fa_description tinyblob, |
| 273 | + fa_user int unsigned default 0, |
| 274 | + fa_user_text varchar(255) binary, |
| 275 | + fa_timestamp binary(14) default '', |
| 276 | + fa_deleted tinyint unsigned NOT NULL default 0 |
| 277 | +) /*$wgDBTableOptions*/; |
| 278 | +CREATE INDEX /*i*/fa_name ON /*_*/filearchive (fa_name, fa_timestamp); |
| 279 | +CREATE INDEX /*i*/fa_storage_group ON /*_*/filearchive (fa_storage_group, fa_storage_key); |
| 280 | +CREATE INDEX /*i*/fa_deleted_timestamp ON /*_*/filearchive (fa_deleted_timestamp); |
| 281 | +CREATE INDEX /*i*/fa_user_timestamp ON /*_*/filearchive (fa_user_text,fa_timestamp); |
| 282 | +CREATE TABLE /*_*/recentchanges ( |
| 283 | + rc_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 284 | + rc_timestamp varbinary(14) NOT NULL default '', |
| 285 | + rc_cur_time varbinary(14) NOT NULL default '', |
| 286 | + rc_user int unsigned NOT NULL default 0, |
| 287 | + rc_user_text varchar(255) binary NOT NULL, |
| 288 | + rc_namespace int NOT NULL default 0, |
| 289 | + rc_title varchar(255) binary NOT NULL default '', |
| 290 | + rc_comment varchar(255) binary NOT NULL default '', |
| 291 | + rc_minor tinyint unsigned NOT NULL default 0, |
| 292 | + rc_bot tinyint unsigned NOT NULL default 0, |
| 293 | + rc_new tinyint unsigned NOT NULL default 0, |
| 294 | + rc_cur_id int unsigned NOT NULL default 0, |
| 295 | + rc_this_oldid int unsigned NOT NULL default 0, |
| 296 | + rc_last_oldid int unsigned NOT NULL default 0, |
| 297 | + rc_type tinyint unsigned NOT NULL default 0, |
| 298 | + rc_moved_to_ns tinyint unsigned NOT NULL default 0, |
| 299 | + rc_moved_to_title varchar(255) binary NOT NULL default '', |
| 300 | + rc_patrolled tinyint unsigned NOT NULL default 0, |
| 301 | + rc_ip varbinary(40) NOT NULL default '', |
| 302 | + rc_old_len int, |
| 303 | + rc_new_len int, |
| 304 | + rc_deleted tinyint unsigned NOT NULL default 0, |
| 305 | + rc_logid int unsigned NOT NULL default 0, |
| 306 | + rc_log_type varbinary(255) NULL default NULL, |
| 307 | + rc_log_action varbinary(255) NULL default NULL, |
| 308 | + rc_params blob NULL |
| 309 | +) /*$wgDBTableOptions*/; |
| 310 | +CREATE INDEX /*i*/rc_timestamp ON /*_*/recentchanges (rc_timestamp); |
| 311 | +CREATE INDEX /*i*/rc_namespace_title ON /*_*/recentchanges (rc_namespace, rc_title); |
| 312 | +CREATE INDEX /*i*/rc_cur_id ON /*_*/recentchanges (rc_cur_id); |
| 313 | +CREATE INDEX /*i*/new_name_timestamp ON /*_*/recentchanges (rc_new,rc_namespace,rc_timestamp); |
| 314 | +CREATE INDEX /*i*/rc_ip ON /*_*/recentchanges (rc_ip); |
| 315 | +CREATE INDEX /*i*/rc_ns_usertext ON /*_*/recentchanges (rc_namespace, rc_user_text); |
| 316 | +CREATE INDEX /*i*/rc_user_text ON /*_*/recentchanges (rc_user_text, rc_timestamp); |
| 317 | +CREATE TABLE /*_*/watchlist ( |
| 318 | + wl_user int unsigned NOT NULL, |
| 319 | + wl_namespace int NOT NULL default 0, |
| 320 | + wl_title varchar(255) binary NOT NULL default '', |
| 321 | + wl_notificationtimestamp varbinary(14) |
| 322 | +) /*$wgDBTableOptions*/; |
| 323 | +CREATE UNIQUE INDEX /*i*/wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title); |
| 324 | +CREATE INDEX /*i*/namespace_title ON /*_*/watchlist (wl_namespace, wl_title); |
| 325 | +CREATE TABLE /*_*/math ( |
| 326 | + math_inputhash varbinary(16) NOT NULL, |
| 327 | + math_outputhash varbinary(16) NOT NULL, |
| 328 | + math_html_conservativeness tinyint NOT NULL, |
| 329 | + math_html text, |
| 330 | + math_mathml text |
| 331 | +) /*$wgDBTableOptions*/; |
| 332 | +CREATE UNIQUE INDEX /*i*/math_inputhash ON /*_*/math (math_inputhash); |
| 333 | +CREATE TABLE /*_*/searchindex ( |
| 334 | + si_page int unsigned NOT NULL, |
| 335 | + si_title varchar(255) NOT NULL default '', |
| 336 | + si_text mediumtext NOT NULL |
| 337 | +) ENGINE=MyISAM; |
| 338 | +CREATE UNIQUE INDEX /*i*/si_page ON /*_*/searchindex (si_page); |
| 339 | +CREATE FULLTEXT INDEX /*i*/si_title ON /*_*/searchindex (si_title); |
| 340 | +CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text); |
| 341 | +CREATE TABLE /*_*/interwiki ( |
| 342 | + iw_prefix varchar(32) NOT NULL, |
| 343 | + iw_url blob NOT NULL, |
| 344 | + iw_api blob NOT NULL, |
| 345 | + iw_wikiid varchar(64) NOT NULL, |
| 346 | + iw_local bool NOT NULL, |
| 347 | + iw_trans tinyint NOT NULL default 0 |
| 348 | +) /*$wgDBTableOptions*/; |
| 349 | +CREATE UNIQUE INDEX /*i*/iw_prefix ON /*_*/interwiki (iw_prefix); |
| 350 | +CREATE TABLE /*_*/querycache ( |
| 351 | + qc_type varbinary(32) NOT NULL, |
| 352 | + qc_value int unsigned NOT NULL default 0, |
| 353 | + qc_namespace int NOT NULL default 0, |
| 354 | + qc_title varchar(255) binary NOT NULL default '' |
| 355 | +) /*$wgDBTableOptions*/; |
| 356 | +CREATE INDEX /*i*/qc_type ON /*_*/querycache (qc_type,qc_value); |
| 357 | +CREATE TABLE /*_*/objectcache ( |
| 358 | + keyname varbinary(255) NOT NULL default '' PRIMARY KEY, |
| 359 | + value mediumblob, |
| 360 | + exptime datetime |
| 361 | +) /*$wgDBTableOptions*/; |
| 362 | +CREATE INDEX /*i*/exptime ON /*_*/objectcache (exptime); |
| 363 | +CREATE TABLE /*_*/transcache ( |
| 364 | + tc_url varbinary(255) NOT NULL, |
| 365 | + tc_contents text, |
| 366 | + tc_time binary(14) NOT NULL |
| 367 | +) /*$wgDBTableOptions*/; |
| 368 | +CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url); |
| 369 | +CREATE TABLE /*_*/logging ( |
| 370 | + log_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 371 | + log_type varbinary(32) NOT NULL default '', |
| 372 | + log_action varbinary(32) NOT NULL default '', |
| 373 | + log_timestamp binary(14) NOT NULL default '19700101000000', |
| 374 | + log_user int unsigned NOT NULL default 0, |
| 375 | + log_user_text varchar(255) binary NOT NULL default '', |
| 376 | + log_namespace int NOT NULL default 0, |
| 377 | + log_title varchar(255) binary NOT NULL default '', |
| 378 | + log_page int unsigned NULL, |
| 379 | + log_comment varchar(255) NOT NULL default '', |
| 380 | + log_params blob NOT NULL, |
| 381 | + log_deleted tinyint unsigned NOT NULL default 0 |
| 382 | +) /*$wgDBTableOptions*/; |
| 383 | +CREATE INDEX /*i*/type_time ON /*_*/logging (log_type, log_timestamp); |
| 384 | +CREATE INDEX /*i*/user_time ON /*_*/logging (log_user, log_timestamp); |
| 385 | +CREATE INDEX /*i*/page_time ON /*_*/logging (log_namespace, log_title, log_timestamp); |
| 386 | +CREATE INDEX /*i*/times ON /*_*/logging (log_timestamp); |
| 387 | +CREATE INDEX /*i*/log_user_type_time ON /*_*/logging (log_user, log_type, log_timestamp); |
| 388 | +CREATE INDEX /*i*/log_page_id_time ON /*_*/logging (log_page,log_timestamp); |
| 389 | +CREATE TABLE /*_*/log_search ( |
| 390 | + ls_field varbinary(32) NOT NULL, |
| 391 | + ls_value varchar(255) NOT NULL, |
| 392 | + ls_log_id int unsigned NOT NULL default 0 |
| 393 | +) /*$wgDBTableOptions*/; |
| 394 | +CREATE UNIQUE INDEX /*i*/ls_field_val ON /*_*/log_search (ls_field,ls_value,ls_log_id); |
| 395 | +CREATE INDEX /*i*/ls_log_id ON /*_*/log_search (ls_log_id); |
| 396 | +CREATE TABLE /*_*/trackbacks ( |
| 397 | + tb_id int PRIMARY KEY AUTO_INCREMENT, |
| 398 | + tb_page int REFERENCES /*_*/page(page_id) ON DELETE CASCADE, |
| 399 | + tb_title varchar(255) NOT NULL, |
| 400 | + tb_url blob NOT NULL, |
| 401 | + tb_ex text, |
| 402 | + tb_name varchar(255) |
| 403 | +) /*$wgDBTableOptions*/; |
| 404 | +CREATE INDEX /*i*/tb_page ON /*_*/trackbacks (tb_page); |
| 405 | +CREATE TABLE /*_*/job ( |
| 406 | + job_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 407 | + job_cmd varbinary(60) NOT NULL default '', |
| 408 | + job_namespace int NOT NULL, |
| 409 | + job_title varchar(255) binary NOT NULL, |
| 410 | + job_params blob NOT NULL |
| 411 | +) /*$wgDBTableOptions*/; |
| 412 | +CREATE INDEX /*i*/job_cmd ON /*_*/job (job_cmd, job_namespace, job_title, job_params(128)); |
| 413 | +CREATE TABLE /*_*/querycache_info ( |
| 414 | + qci_type varbinary(32) NOT NULL default '', |
| 415 | + qci_timestamp binary(14) NOT NULL default '19700101000000' |
| 416 | +) /*$wgDBTableOptions*/; |
| 417 | +CREATE UNIQUE INDEX /*i*/qci_type ON /*_*/querycache_info (qci_type); |
| 418 | +CREATE TABLE /*_*/redirect ( |
| 419 | + rd_from int unsigned NOT NULL default 0 PRIMARY KEY, |
| 420 | + rd_namespace int NOT NULL default 0, |
| 421 | + rd_title varchar(255) binary NOT NULL default '', |
| 422 | + rd_interwiki varchar(32) default NULL, |
| 423 | + rd_fragment varchar(255) binary default NULL |
| 424 | +) /*$wgDBTableOptions*/; |
| 425 | +CREATE INDEX /*i*/rd_ns_title ON /*_*/redirect (rd_namespace,rd_title,rd_from); |
| 426 | +CREATE TABLE /*_*/querycachetwo ( |
| 427 | + qcc_type varbinary(32) NOT NULL, |
| 428 | + qcc_value int unsigned NOT NULL default 0, |
| 429 | + qcc_namespace int NOT NULL default 0, |
| 430 | + qcc_title varchar(255) binary NOT NULL default '', |
| 431 | + qcc_namespacetwo int NOT NULL default 0, |
| 432 | + qcc_titletwo varchar(255) binary NOT NULL default '' |
| 433 | +) /*$wgDBTableOptions*/; |
| 434 | +CREATE INDEX /*i*/qcc_type ON /*_*/querycachetwo (qcc_type,qcc_value); |
| 435 | +CREATE INDEX /*i*/qcc_title ON /*_*/querycachetwo (qcc_type,qcc_namespace,qcc_title); |
| 436 | +CREATE INDEX /*i*/qcc_titletwo ON /*_*/querycachetwo (qcc_type,qcc_namespacetwo,qcc_titletwo); |
| 437 | +CREATE TABLE /*_*/page_restrictions ( |
| 438 | + pr_page int NOT NULL, |
| 439 | + pr_type varbinary(60) NOT NULL, |
| 440 | + pr_level varbinary(60) NOT NULL, |
| 441 | + pr_cascade tinyint NOT NULL, |
| 442 | + pr_user int NULL, |
| 443 | + pr_expiry varbinary(14) NULL, |
| 444 | + pr_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT |
| 445 | +) /*$wgDBTableOptions*/; |
| 446 | +CREATE UNIQUE INDEX /*i*/pr_pagetype ON /*_*/page_restrictions (pr_page,pr_type); |
| 447 | +CREATE INDEX /*i*/pr_typelevel ON /*_*/page_restrictions (pr_type,pr_level); |
| 448 | +CREATE INDEX /*i*/pr_level ON /*_*/page_restrictions (pr_level); |
| 449 | +CREATE INDEX /*i*/pr_cascade ON /*_*/page_restrictions (pr_cascade); |
| 450 | +CREATE TABLE /*_*/protected_titles ( |
| 451 | + pt_namespace int NOT NULL, |
| 452 | + pt_title varchar(255) binary NOT NULL, |
| 453 | + pt_user int unsigned NOT NULL, |
| 454 | + pt_reason tinyblob, |
| 455 | + pt_timestamp binary(14) NOT NULL, |
| 456 | + pt_expiry varbinary(14) NOT NULL default '', |
| 457 | + pt_create_perm varbinary(60) NOT NULL |
| 458 | +) /*$wgDBTableOptions*/; |
| 459 | +CREATE UNIQUE INDEX /*i*/pt_namespace_title ON /*_*/protected_titles (pt_namespace,pt_title); |
| 460 | +CREATE INDEX /*i*/pt_timestamp ON /*_*/protected_titles (pt_timestamp); |
| 461 | +CREATE TABLE /*_*/page_props ( |
| 462 | + pp_page int NOT NULL, |
| 463 | + pp_propname varbinary(60) NOT NULL, |
| 464 | + pp_value blob NOT NULL |
| 465 | +) /*$wgDBTableOptions*/; |
| 466 | +CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname); |
| 467 | +CREATE TABLE /*_*/updatelog ( |
| 468 | + ul_key varchar(255) NOT NULL PRIMARY KEY, |
| 469 | + ul_value blob |
| 470 | +) /*$wgDBTableOptions*/; |
| 471 | +CREATE TABLE /*_*/change_tag ( |
| 472 | + ct_rc_id int NULL, |
| 473 | + ct_log_id int NULL, |
| 474 | + ct_rev_id int NULL, |
| 475 | + ct_tag varchar(255) NOT NULL, |
| 476 | + ct_params blob NULL |
| 477 | +) /*$wgDBTableOptions*/; |
| 478 | +CREATE UNIQUE INDEX /*i*/change_tag_rc_tag ON /*_*/change_tag (ct_rc_id,ct_tag); |
| 479 | +CREATE UNIQUE INDEX /*i*/change_tag_log_tag ON /*_*/change_tag (ct_log_id,ct_tag); |
| 480 | +CREATE UNIQUE INDEX /*i*/change_tag_rev_tag ON /*_*/change_tag (ct_rev_id,ct_tag); |
| 481 | +CREATE INDEX /*i*/change_tag_tag_id ON /*_*/change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id); |
| 482 | +CREATE TABLE /*_*/tag_summary ( |
| 483 | + ts_rc_id int NULL, |
| 484 | + ts_log_id int NULL, |
| 485 | + ts_rev_id int NULL, |
| 486 | + ts_tags blob NOT NULL |
| 487 | +) /*$wgDBTableOptions*/; |
| 488 | +CREATE UNIQUE INDEX /*i*/tag_summary_rc_id ON /*_*/tag_summary (ts_rc_id); |
| 489 | +CREATE UNIQUE INDEX /*i*/tag_summary_log_id ON /*_*/tag_summary (ts_log_id); |
| 490 | +CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id); |
| 491 | +CREATE TABLE /*_*/valid_tag ( |
| 492 | + vt_tag varchar(255) NOT NULL PRIMARY KEY |
| 493 | +) /*$wgDBTableOptions*/; |
| 494 | +CREATE TABLE /*_*/l10n_cache ( |
| 495 | + lc_lang varbinary(32) NOT NULL, |
| 496 | + lc_key varchar(255) NOT NULL, |
| 497 | + lc_value mediumblob NOT NULL |
| 498 | +) /*$wgDBTableOptions*/; |
| 499 | +CREATE INDEX /*i*/lc_lang_key ON /*_*/l10n_cache (lc_lang, lc_key); |
| 500 | +CREATE TABLE /*_*/msg_resource ( |
| 501 | + mr_resource varbinary(255) NOT NULL, |
| 502 | + mr_lang varbinary(32) NOT NULL, |
| 503 | + mr_blob mediumblob NOT NULL, |
| 504 | + mr_timestamp binary(14) NOT NULL |
| 505 | +) /*$wgDBTableOptions*/; |
| 506 | +CREATE UNIQUE INDEX /*i*/mr_resource_lang ON /*_*/msg_resource (mr_resource, mr_lang); |
| 507 | +CREATE TABLE /*_*/msg_resource_links ( |
| 508 | + mrl_resource varbinary(255) NOT NULL, |
| 509 | + mrl_message varbinary(255) NOT NULL |
| 510 | +) /*$wgDBTableOptions*/; |
| 511 | +CREATE UNIQUE INDEX /*i*/mrl_message_resource ON /*_*/msg_resource_links (mrl_message, mrl_resource); |
| 512 | +CREATE TABLE /*_*/module_deps ( |
| 513 | + md_module varbinary(255) NOT NULL, |
| 514 | + md_skin varbinary(32) NOT NULL, |
| 515 | + md_deps mediumblob NOT NULL |
| 516 | +) /*$wgDBTableOptions*/; |
| 517 | +CREATE UNIQUE INDEX /*i*/md_module_skin ON /*_*/module_deps (md_module, md_skin); |
Property changes on: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.17.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 518 | + native |
Index: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.18.sql |
— | — | @@ -0,0 +1,535 @@ |
| 2 | +-- This is a copy of MediaWiki 1.18 schema shared by MySQL and SQLite. |
| 3 | +-- It is used for updater testing. Comments are stripped to decrease |
| 4 | +-- file size, as we don't need to maintain it. |
| 5 | + |
| 6 | +CREATE TABLE /*_*/user ( |
| 7 | + user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 8 | + user_name varchar(255) binary NOT NULL default '', |
| 9 | + user_real_name varchar(255) binary NOT NULL default '', |
| 10 | + user_password tinyblob NOT NULL, |
| 11 | + user_newpassword tinyblob NOT NULL, |
| 12 | + user_newpass_time binary(14), |
| 13 | + user_email tinytext NOT NULL, |
| 14 | + user_options blob NOT NULL, |
| 15 | + user_touched binary(14) NOT NULL default '', |
| 16 | + user_token binary(32) NOT NULL default '', |
| 17 | + user_email_authenticated binary(14), |
| 18 | + user_email_token binary(32), |
| 19 | + user_email_token_expires binary(14), |
| 20 | + user_registration binary(14), |
| 21 | + user_editcount int |
| 22 | +) /*$wgDBTableOptions*/; |
| 23 | +CREATE UNIQUE INDEX /*i*/user_name ON /*_*/user (user_name); |
| 24 | +CREATE INDEX /*i*/user_email_token ON /*_*/user (user_email_token); |
| 25 | +CREATE INDEX /*i*/user_email ON /*_*/user (user_email(50)); |
| 26 | +CREATE TABLE /*_*/user_groups ( |
| 27 | + ug_user int unsigned NOT NULL default 0, |
| 28 | + ug_group varbinary(16) NOT NULL default '' |
| 29 | +) /*$wgDBTableOptions*/; |
| 30 | +CREATE UNIQUE INDEX /*i*/ug_user_group ON /*_*/user_groups (ug_user,ug_group); |
| 31 | +CREATE INDEX /*i*/ug_group ON /*_*/user_groups (ug_group); |
| 32 | +CREATE TABLE /*_*/user_former_groups ( |
| 33 | + ufg_user int unsigned NOT NULL default 0, |
| 34 | + ufg_group varbinary(16) NOT NULL default '' |
| 35 | +) /*$wgDBTableOptions*/; |
| 36 | +CREATE UNIQUE INDEX /*i*/ufg_user_group ON /*_*/user_former_groups (ufg_user,ufg_group); |
| 37 | +CREATE TABLE /*_*/user_newtalk ( |
| 38 | + user_id int NOT NULL default 0, |
| 39 | + user_ip varbinary(40) NOT NULL default '', |
| 40 | + user_last_timestamp varbinary(14) NULL default NULL |
| 41 | +) /*$wgDBTableOptions*/; |
| 42 | +CREATE INDEX /*i*/un_user_id ON /*_*/user_newtalk (user_id); |
| 43 | +CREATE INDEX /*i*/un_user_ip ON /*_*/user_newtalk (user_ip); |
| 44 | +CREATE TABLE /*_*/user_properties ( |
| 45 | + up_user int NOT NULL, |
| 46 | + up_property varbinary(255) NOT NULL, |
| 47 | + up_value blob |
| 48 | +) /*$wgDBTableOptions*/; |
| 49 | +CREATE UNIQUE INDEX /*i*/user_properties_user_property ON /*_*/user_properties (up_user,up_property); |
| 50 | +CREATE INDEX /*i*/user_properties_property ON /*_*/user_properties (up_property); |
| 51 | +CREATE TABLE /*_*/page ( |
| 52 | + page_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 53 | + page_namespace int NOT NULL, |
| 54 | + page_title varchar(255) binary NOT NULL, |
| 55 | + page_restrictions tinyblob NOT NULL, |
| 56 | + page_counter bigint unsigned NOT NULL default 0, |
| 57 | + page_is_redirect tinyint unsigned NOT NULL default 0, |
| 58 | + page_is_new tinyint unsigned NOT NULL default 0, |
| 59 | + page_random real unsigned NOT NULL, |
| 60 | + page_touched binary(14) NOT NULL default '', |
| 61 | + page_latest int unsigned NOT NULL, |
| 62 | + page_len int unsigned NOT NULL |
| 63 | +) /*$wgDBTableOptions*/; |
| 64 | +CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title); |
| 65 | +CREATE INDEX /*i*/page_random ON /*_*/page (page_random); |
| 66 | +CREATE INDEX /*i*/page_len ON /*_*/page (page_len); |
| 67 | +CREATE TABLE /*_*/revision ( |
| 68 | + rev_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 69 | + rev_page int unsigned NOT NULL, |
| 70 | + rev_text_id int unsigned NOT NULL, |
| 71 | + rev_comment tinyblob NOT NULL, |
| 72 | + rev_user int unsigned NOT NULL default 0, |
| 73 | + rev_user_text varchar(255) binary NOT NULL default '', |
| 74 | + rev_timestamp binary(14) NOT NULL default '', |
| 75 | + rev_minor_edit tinyint unsigned NOT NULL default 0, |
| 76 | + rev_deleted tinyint unsigned NOT NULL default 0, |
| 77 | + rev_len int unsigned, |
| 78 | + rev_parent_id int unsigned default NULL |
| 79 | +) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024; |
| 80 | +CREATE UNIQUE INDEX /*i*/rev_page_id ON /*_*/revision (rev_page, rev_id); |
| 81 | +CREATE INDEX /*i*/rev_timestamp ON /*_*/revision (rev_timestamp); |
| 82 | +CREATE INDEX /*i*/page_timestamp ON /*_*/revision (rev_page,rev_timestamp); |
| 83 | +CREATE INDEX /*i*/user_timestamp ON /*_*/revision (rev_user,rev_timestamp); |
| 84 | +CREATE INDEX /*i*/usertext_timestamp ON /*_*/revision (rev_user_text,rev_timestamp); |
| 85 | +CREATE TABLE /*_*/text ( |
| 86 | + old_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 87 | + old_text mediumblob NOT NULL, |
| 88 | + old_flags tinyblob NOT NULL |
| 89 | +) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=10240; |
| 90 | +CREATE TABLE /*_*/archive ( |
| 91 | + ar_namespace int NOT NULL default 0, |
| 92 | + ar_title varchar(255) binary NOT NULL default '', |
| 93 | + ar_text mediumblob NOT NULL, |
| 94 | + ar_comment tinyblob NOT NULL, |
| 95 | + ar_user int unsigned NOT NULL default 0, |
| 96 | + ar_user_text varchar(255) binary NOT NULL, |
| 97 | + ar_timestamp binary(14) NOT NULL default '', |
| 98 | + ar_minor_edit tinyint NOT NULL default 0, |
| 99 | + ar_flags tinyblob NOT NULL, |
| 100 | + ar_rev_id int unsigned, |
| 101 | + ar_text_id int unsigned, |
| 102 | + ar_deleted tinyint unsigned NOT NULL default 0, |
| 103 | + ar_len int unsigned, |
| 104 | + ar_page_id int unsigned, |
| 105 | + ar_parent_id int unsigned default NULL |
| 106 | +) /*$wgDBTableOptions*/; |
| 107 | +CREATE INDEX /*i*/name_title_timestamp ON /*_*/archive (ar_namespace,ar_title,ar_timestamp); |
| 108 | +CREATE INDEX /*i*/ar_usertext_timestamp ON /*_*/archive (ar_user_text,ar_timestamp); |
| 109 | +CREATE INDEX /*i*/ar_revid ON /*_*/archive (ar_rev_id); |
| 110 | +CREATE TABLE /*_*/pagelinks ( |
| 111 | + pl_from int unsigned NOT NULL default 0, |
| 112 | + pl_namespace int NOT NULL default 0, |
| 113 | + pl_title varchar(255) binary NOT NULL default '' |
| 114 | +) /*$wgDBTableOptions*/; |
| 115 | +CREATE UNIQUE INDEX /*i*/pl_from ON /*_*/pagelinks (pl_from,pl_namespace,pl_title); |
| 116 | +CREATE UNIQUE INDEX /*i*/pl_namespace ON /*_*/pagelinks (pl_namespace,pl_title,pl_from); |
| 117 | +CREATE TABLE /*_*/templatelinks ( |
| 118 | + tl_from int unsigned NOT NULL default 0, |
| 119 | + tl_namespace int NOT NULL default 0, |
| 120 | + tl_title varchar(255) binary NOT NULL default '' |
| 121 | +) /*$wgDBTableOptions*/; |
| 122 | +CREATE UNIQUE INDEX /*i*/tl_from ON /*_*/templatelinks (tl_from,tl_namespace,tl_title); |
| 123 | +CREATE UNIQUE INDEX /*i*/tl_namespace ON /*_*/templatelinks (tl_namespace,tl_title,tl_from); |
| 124 | +CREATE TABLE /*_*/imagelinks ( |
| 125 | + il_from int unsigned NOT NULL default 0, |
| 126 | + il_to varchar(255) binary NOT NULL default '' |
| 127 | +) /*$wgDBTableOptions*/; |
| 128 | +CREATE UNIQUE INDEX /*i*/il_from ON /*_*/imagelinks (il_from,il_to); |
| 129 | +CREATE UNIQUE INDEX /*i*/il_to ON /*_*/imagelinks (il_to,il_from); |
| 130 | +CREATE TABLE /*_*/categorylinks ( |
| 131 | + cl_from int unsigned NOT NULL default 0, |
| 132 | + cl_to varchar(255) binary NOT NULL default '', |
| 133 | + cl_sortkey varbinary(230) NOT NULL default '', |
| 134 | + cl_sortkey_prefix varchar(255) binary NOT NULL default '', |
| 135 | + cl_timestamp timestamp NOT NULL, |
| 136 | + cl_collation varbinary(32) NOT NULL default '', |
| 137 | + cl_type ENUM('page', 'subcat', 'file') NOT NULL default 'page' |
| 138 | +) /*$wgDBTableOptions*/; |
| 139 | +CREATE UNIQUE INDEX /*i*/cl_from ON /*_*/categorylinks (cl_from,cl_to); |
| 140 | +CREATE INDEX /*i*/cl_sortkey ON /*_*/categorylinks (cl_to,cl_type,cl_sortkey,cl_from); |
| 141 | +CREATE INDEX /*i*/cl_timestamp ON /*_*/categorylinks (cl_to,cl_timestamp); |
| 142 | +CREATE INDEX /*i*/cl_collation ON /*_*/categorylinks (cl_collation); |
| 143 | +CREATE TABLE /*_*/category ( |
| 144 | + cat_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 145 | + cat_title varchar(255) binary NOT NULL, |
| 146 | + cat_pages int signed NOT NULL default 0, |
| 147 | + cat_subcats int signed NOT NULL default 0, |
| 148 | + cat_files int signed NOT NULL default 0, |
| 149 | + cat_hidden tinyint unsigned NOT NULL default 0 |
| 150 | +) /*$wgDBTableOptions*/; |
| 151 | +CREATE UNIQUE INDEX /*i*/cat_title ON /*_*/category (cat_title); |
| 152 | +CREATE INDEX /*i*/cat_pages ON /*_*/category (cat_pages); |
| 153 | +CREATE TABLE /*_*/externallinks ( |
| 154 | + el_from int unsigned NOT NULL default 0, |
| 155 | + el_to blob NOT NULL, |
| 156 | + el_index blob NOT NULL |
| 157 | +) /*$wgDBTableOptions*/; |
| 158 | +CREATE INDEX /*i*/el_from ON /*_*/externallinks (el_from, el_to(40)); |
| 159 | +CREATE INDEX /*i*/el_to ON /*_*/externallinks (el_to(60), el_from); |
| 160 | +CREATE INDEX /*i*/el_index ON /*_*/externallinks (el_index(60)); |
| 161 | +CREATE TABLE /*_*/external_user ( |
| 162 | + eu_local_id int unsigned NOT NULL PRIMARY KEY, |
| 163 | + eu_external_id varchar(255) binary NOT NULL |
| 164 | +) /*$wgDBTableOptions*/; |
| 165 | +CREATE UNIQUE INDEX /*i*/eu_external_id ON /*_*/external_user (eu_external_id); |
| 166 | +CREATE TABLE /*_*/langlinks ( |
| 167 | + ll_from int unsigned NOT NULL default 0, |
| 168 | + ll_lang varbinary(20) NOT NULL default '', |
| 169 | + ll_title varchar(255) binary NOT NULL default '' |
| 170 | +) /*$wgDBTableOptions*/; |
| 171 | +CREATE UNIQUE INDEX /*i*/ll_from ON /*_*/langlinks (ll_from, ll_lang); |
| 172 | +CREATE INDEX /*i*/ll_lang ON /*_*/langlinks (ll_lang, ll_title); |
| 173 | +CREATE TABLE /*_*/iwlinks ( |
| 174 | + iwl_from int unsigned NOT NULL default 0, |
| 175 | + iwl_prefix varbinary(20) NOT NULL default '', |
| 176 | + iwl_title varchar(255) binary NOT NULL default '' |
| 177 | +) /*$wgDBTableOptions*/; |
| 178 | +CREATE UNIQUE INDEX /*i*/iwl_from ON /*_*/iwlinks (iwl_from, iwl_prefix, iwl_title); |
| 179 | +CREATE UNIQUE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from); |
| 180 | +CREATE TABLE /*_*/site_stats ( |
| 181 | + ss_row_id int unsigned NOT NULL, |
| 182 | + ss_total_views bigint unsigned default 0, |
| 183 | + ss_total_edits bigint unsigned default 0, |
| 184 | + ss_good_articles bigint unsigned default 0, |
| 185 | + ss_total_pages bigint default '-1', |
| 186 | + ss_users bigint default '-1', |
| 187 | + ss_active_users bigint default '-1', |
| 188 | + ss_admins int default '-1', |
| 189 | + ss_images int default 0 |
| 190 | +) /*$wgDBTableOptions*/; |
| 191 | +CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id); |
| 192 | +CREATE TABLE /*_*/hitcounter ( |
| 193 | + hc_id int unsigned NOT NULL |
| 194 | +) ENGINE=HEAP MAX_ROWS=25000; |
| 195 | +CREATE TABLE /*_*/ipblocks ( |
| 196 | + ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 197 | + ipb_address tinyblob NOT NULL, |
| 198 | + ipb_user int unsigned NOT NULL default 0, |
| 199 | + ipb_by int unsigned NOT NULL default 0, |
| 200 | + ipb_by_text varchar(255) binary NOT NULL default '', |
| 201 | + ipb_reason tinyblob NOT NULL, |
| 202 | + ipb_timestamp binary(14) NOT NULL default '', |
| 203 | + ipb_auto bool NOT NULL default 0, |
| 204 | + ipb_anon_only bool NOT NULL default 0, |
| 205 | + ipb_create_account bool NOT NULL default 1, |
| 206 | + ipb_enable_autoblock bool NOT NULL default '1', |
| 207 | + ipb_expiry varbinary(14) NOT NULL default '', |
| 208 | + ipb_range_start tinyblob NOT NULL, |
| 209 | + ipb_range_end tinyblob NOT NULL, |
| 210 | + ipb_deleted bool NOT NULL default 0, |
| 211 | + ipb_block_email bool NOT NULL default 0, |
| 212 | + ipb_allow_usertalk bool NOT NULL default 0 |
| 213 | +) /*$wgDBTableOptions*/; |
| 214 | +CREATE UNIQUE INDEX /*i*/ipb_address ON /*_*/ipblocks (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only); |
| 215 | +CREATE INDEX /*i*/ipb_user ON /*_*/ipblocks (ipb_user); |
| 216 | +CREATE INDEX /*i*/ipb_range ON /*_*/ipblocks (ipb_range_start(8), ipb_range_end(8)); |
| 217 | +CREATE INDEX /*i*/ipb_timestamp ON /*_*/ipblocks (ipb_timestamp); |
| 218 | +CREATE INDEX /*i*/ipb_expiry ON /*_*/ipblocks (ipb_expiry); |
| 219 | +CREATE TABLE /*_*/image ( |
| 220 | + img_name varchar(255) binary NOT NULL default '' PRIMARY KEY, |
| 221 | + img_size int unsigned NOT NULL default 0, |
| 222 | + img_width int NOT NULL default 0, |
| 223 | + img_height int NOT NULL default 0, |
| 224 | + img_metadata mediumblob NOT NULL, |
| 225 | + img_bits int NOT NULL default 0, |
| 226 | + img_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 227 | + img_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown", |
| 228 | + img_minor_mime varbinary(100) NOT NULL default "unknown", |
| 229 | + img_description tinyblob NOT NULL, |
| 230 | + img_user int unsigned NOT NULL default 0, |
| 231 | + img_user_text varchar(255) binary NOT NULL, |
| 232 | + img_timestamp varbinary(14) NOT NULL default '', |
| 233 | + img_sha1 varbinary(32) NOT NULL default '' |
| 234 | +) /*$wgDBTableOptions*/; |
| 235 | +CREATE INDEX /*i*/img_usertext_timestamp ON /*_*/image (img_user_text,img_timestamp); |
| 236 | +CREATE INDEX /*i*/img_size ON /*_*/image (img_size); |
| 237 | +CREATE INDEX /*i*/img_timestamp ON /*_*/image (img_timestamp); |
| 238 | +CREATE INDEX /*i*/img_sha1 ON /*_*/image (img_sha1); |
| 239 | +CREATE TABLE /*_*/oldimage ( |
| 240 | + oi_name varchar(255) binary NOT NULL default '', |
| 241 | + oi_archive_name varchar(255) binary NOT NULL default '', |
| 242 | + oi_size int unsigned NOT NULL default 0, |
| 243 | + oi_width int NOT NULL default 0, |
| 244 | + oi_height int NOT NULL default 0, |
| 245 | + oi_bits int NOT NULL default 0, |
| 246 | + oi_description tinyblob NOT NULL, |
| 247 | + oi_user int unsigned NOT NULL default 0, |
| 248 | + oi_user_text varchar(255) binary NOT NULL, |
| 249 | + oi_timestamp binary(14) NOT NULL default '', |
| 250 | + oi_metadata mediumblob NOT NULL, |
| 251 | + oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 252 | + oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown", |
| 253 | + oi_minor_mime varbinary(100) NOT NULL default "unknown", |
| 254 | + oi_deleted tinyint unsigned NOT NULL default 0, |
| 255 | + oi_sha1 varbinary(32) NOT NULL default '' |
| 256 | +) /*$wgDBTableOptions*/; |
| 257 | +CREATE INDEX /*i*/oi_usertext_timestamp ON /*_*/oldimage (oi_user_text,oi_timestamp); |
| 258 | +CREATE INDEX /*i*/oi_name_timestamp ON /*_*/oldimage (oi_name,oi_timestamp); |
| 259 | +CREATE INDEX /*i*/oi_name_archive_name ON /*_*/oldimage (oi_name,oi_archive_name(14)); |
| 260 | +CREATE INDEX /*i*/oi_sha1 ON /*_*/oldimage (oi_sha1); |
| 261 | +CREATE TABLE /*_*/filearchive ( |
| 262 | + fa_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 263 | + fa_name varchar(255) binary NOT NULL default '', |
| 264 | + fa_archive_name varchar(255) binary default '', |
| 265 | + fa_storage_group varbinary(16), |
| 266 | + fa_storage_key varbinary(64) default '', |
| 267 | + fa_deleted_user int, |
| 268 | + fa_deleted_timestamp binary(14) default '', |
| 269 | + fa_deleted_reason text, |
| 270 | + fa_size int unsigned default 0, |
| 271 | + fa_width int default 0, |
| 272 | + fa_height int default 0, |
| 273 | + fa_metadata mediumblob, |
| 274 | + fa_bits int default 0, |
| 275 | + fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 276 | + fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") default "unknown", |
| 277 | + fa_minor_mime varbinary(100) default "unknown", |
| 278 | + fa_description tinyblob, |
| 279 | + fa_user int unsigned default 0, |
| 280 | + fa_user_text varchar(255) binary, |
| 281 | + fa_timestamp binary(14) default '', |
| 282 | + fa_deleted tinyint unsigned NOT NULL default 0 |
| 283 | +) /*$wgDBTableOptions*/; |
| 284 | +CREATE INDEX /*i*/fa_name ON /*_*/filearchive (fa_name, fa_timestamp); |
| 285 | +CREATE INDEX /*i*/fa_storage_group ON /*_*/filearchive (fa_storage_group, fa_storage_key); |
| 286 | +CREATE INDEX /*i*/fa_deleted_timestamp ON /*_*/filearchive (fa_deleted_timestamp); |
| 287 | +CREATE INDEX /*i*/fa_user_timestamp ON /*_*/filearchive (fa_user_text,fa_timestamp); |
| 288 | +CREATE TABLE /*_*/uploadstash ( |
| 289 | + us_id int unsigned NOT NULL PRIMARY KEY auto_increment, |
| 290 | + us_user int unsigned NOT NULL, |
| 291 | + us_key varchar(255) NOT NULL, |
| 292 | + us_orig_path varchar(255) NOT NULL, |
| 293 | + us_path varchar(255) NOT NULL, |
| 294 | + us_source_type varchar(50), |
| 295 | + us_timestamp varbinary(14) not null, |
| 296 | + us_status varchar(50) not null, |
| 297 | + us_size int unsigned NOT NULL, |
| 298 | + us_sha1 varchar(31) NOT NULL, |
| 299 | + us_mime varchar(255), |
| 300 | + us_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 301 | + us_image_width int unsigned, |
| 302 | + us_image_height int unsigned, |
| 303 | + us_image_bits smallint unsigned |
| 304 | +) /*$wgDBTableOptions*/; |
| 305 | +CREATE INDEX /*i*/us_user ON /*_*/uploadstash (us_user); |
| 306 | +CREATE UNIQUE INDEX /*i*/us_key ON /*_*/uploadstash (us_key); |
| 307 | +CREATE INDEX /*i*/us_timestamp ON /*_*/uploadstash (us_timestamp); |
| 308 | +CREATE TABLE /*_*/recentchanges ( |
| 309 | + rc_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 310 | + rc_timestamp varbinary(14) NOT NULL default '', |
| 311 | + rc_cur_time varbinary(14) NOT NULL default '', |
| 312 | + rc_user int unsigned NOT NULL default 0, |
| 313 | + rc_user_text varchar(255) binary NOT NULL, |
| 314 | + rc_namespace int NOT NULL default 0, |
| 315 | + rc_title varchar(255) binary NOT NULL default '', |
| 316 | + rc_comment varchar(255) binary NOT NULL default '', |
| 317 | + rc_minor tinyint unsigned NOT NULL default 0, |
| 318 | + rc_bot tinyint unsigned NOT NULL default 0, |
| 319 | + rc_new tinyint unsigned NOT NULL default 0, |
| 320 | + rc_cur_id int unsigned NOT NULL default 0, |
| 321 | + rc_this_oldid int unsigned NOT NULL default 0, |
| 322 | + rc_last_oldid int unsigned NOT NULL default 0, |
| 323 | + rc_type tinyint unsigned NOT NULL default 0, |
| 324 | + rc_moved_to_ns tinyint unsigned NOT NULL default 0, |
| 325 | + rc_moved_to_title varchar(255) binary NOT NULL default '', |
| 326 | + rc_patrolled tinyint unsigned NOT NULL default 0, |
| 327 | + rc_ip varbinary(40) NOT NULL default '', |
| 328 | + rc_old_len int, |
| 329 | + rc_new_len int, |
| 330 | + rc_deleted tinyint unsigned NOT NULL default 0, |
| 331 | + rc_logid int unsigned NOT NULL default 0, |
| 332 | + rc_log_type varbinary(255) NULL default NULL, |
| 333 | + rc_log_action varbinary(255) NULL default NULL, |
| 334 | + rc_params blob NULL |
| 335 | +) /*$wgDBTableOptions*/; |
| 336 | +CREATE INDEX /*i*/rc_timestamp ON /*_*/recentchanges (rc_timestamp); |
| 337 | +CREATE INDEX /*i*/rc_namespace_title ON /*_*/recentchanges (rc_namespace, rc_title); |
| 338 | +CREATE INDEX /*i*/rc_cur_id ON /*_*/recentchanges (rc_cur_id); |
| 339 | +CREATE INDEX /*i*/new_name_timestamp ON /*_*/recentchanges (rc_new,rc_namespace,rc_timestamp); |
| 340 | +CREATE INDEX /*i*/rc_ip ON /*_*/recentchanges (rc_ip); |
| 341 | +CREATE INDEX /*i*/rc_ns_usertext ON /*_*/recentchanges (rc_namespace, rc_user_text); |
| 342 | +CREATE INDEX /*i*/rc_user_text ON /*_*/recentchanges (rc_user_text, rc_timestamp); |
| 343 | +CREATE TABLE /*_*/watchlist ( |
| 344 | + wl_user int unsigned NOT NULL, |
| 345 | + wl_namespace int NOT NULL default 0, |
| 346 | + wl_title varchar(255) binary NOT NULL default '', |
| 347 | + wl_notificationtimestamp varbinary(14) |
| 348 | +) /*$wgDBTableOptions*/; |
| 349 | +CREATE UNIQUE INDEX /*i*/wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title); |
| 350 | +CREATE INDEX /*i*/namespace_title ON /*_*/watchlist (wl_namespace, wl_title); |
| 351 | +CREATE TABLE /*_*/searchindex ( |
| 352 | + si_page int unsigned NOT NULL, |
| 353 | + si_title varchar(255) NOT NULL default '', |
| 354 | + si_text mediumtext NOT NULL |
| 355 | +) ENGINE=MyISAM; |
| 356 | +CREATE UNIQUE INDEX /*i*/si_page ON /*_*/searchindex (si_page); |
| 357 | +CREATE FULLTEXT INDEX /*i*/si_title ON /*_*/searchindex (si_title); |
| 358 | +CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text); |
| 359 | +CREATE TABLE /*_*/interwiki ( |
| 360 | + iw_prefix varchar(32) NOT NULL, |
| 361 | + iw_url blob NOT NULL, |
| 362 | + iw_api blob NOT NULL, |
| 363 | + iw_wikiid varchar(64) NOT NULL, |
| 364 | + iw_local bool NOT NULL, |
| 365 | + iw_trans tinyint NOT NULL default 0 |
| 366 | +) /*$wgDBTableOptions*/; |
| 367 | +CREATE UNIQUE INDEX /*i*/iw_prefix ON /*_*/interwiki (iw_prefix); |
| 368 | +CREATE TABLE /*_*/querycache ( |
| 369 | + qc_type varbinary(32) NOT NULL, |
| 370 | + qc_value int unsigned NOT NULL default 0, |
| 371 | + qc_namespace int NOT NULL default 0, |
| 372 | + qc_title varchar(255) binary NOT NULL default '' |
| 373 | +) /*$wgDBTableOptions*/; |
| 374 | +CREATE INDEX /*i*/qc_type ON /*_*/querycache (qc_type,qc_value); |
| 375 | +CREATE TABLE /*_*/objectcache ( |
| 376 | + keyname varbinary(255) NOT NULL default '' PRIMARY KEY, |
| 377 | + value mediumblob, |
| 378 | + exptime datetime |
| 379 | +) /*$wgDBTableOptions*/; |
| 380 | +CREATE INDEX /*i*/exptime ON /*_*/objectcache (exptime); |
| 381 | +CREATE TABLE /*_*/transcache ( |
| 382 | + tc_url varbinary(255) NOT NULL, |
| 383 | + tc_contents text, |
| 384 | + tc_time binary(14) NOT NULL |
| 385 | +) /*$wgDBTableOptions*/; |
| 386 | +CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url); |
| 387 | +CREATE TABLE /*_*/logging ( |
| 388 | + log_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 389 | + log_type varbinary(32) NOT NULL default '', |
| 390 | + log_action varbinary(32) NOT NULL default '', |
| 391 | + log_timestamp binary(14) NOT NULL default '19700101000000', |
| 392 | + log_user int unsigned NOT NULL default 0, |
| 393 | + log_user_text varchar(255) binary NOT NULL default '', |
| 394 | + log_namespace int NOT NULL default 0, |
| 395 | + log_title varchar(255) binary NOT NULL default '', |
| 396 | + log_page int unsigned NULL, |
| 397 | + log_comment varchar(255) NOT NULL default '', |
| 398 | + log_params blob NOT NULL, |
| 399 | + log_deleted tinyint unsigned NOT NULL default 0 |
| 400 | +) /*$wgDBTableOptions*/; |
| 401 | +CREATE INDEX /*i*/type_time ON /*_*/logging (log_type, log_timestamp); |
| 402 | +CREATE INDEX /*i*/user_time ON /*_*/logging (log_user, log_timestamp); |
| 403 | +CREATE INDEX /*i*/page_time ON /*_*/logging (log_namespace, log_title, log_timestamp); |
| 404 | +CREATE INDEX /*i*/times ON /*_*/logging (log_timestamp); |
| 405 | +CREATE INDEX /*i*/log_user_type_time ON /*_*/logging (log_user, log_type, log_timestamp); |
| 406 | +CREATE INDEX /*i*/log_page_id_time ON /*_*/logging (log_page,log_timestamp); |
| 407 | +CREATE TABLE /*_*/log_search ( |
| 408 | + ls_field varbinary(32) NOT NULL, |
| 409 | + ls_value varchar(255) NOT NULL, |
| 410 | + ls_log_id int unsigned NOT NULL default 0 |
| 411 | +) /*$wgDBTableOptions*/; |
| 412 | +CREATE UNIQUE INDEX /*i*/ls_field_val ON /*_*/log_search (ls_field,ls_value,ls_log_id); |
| 413 | +CREATE INDEX /*i*/ls_log_id ON /*_*/log_search (ls_log_id); |
| 414 | +CREATE TABLE /*_*/trackbacks ( |
| 415 | + tb_id int PRIMARY KEY AUTO_INCREMENT, |
| 416 | + tb_page int REFERENCES /*_*/page(page_id) ON DELETE CASCADE, |
| 417 | + tb_title varchar(255) NOT NULL, |
| 418 | + tb_url blob NOT NULL, |
| 419 | + tb_ex text, |
| 420 | + tb_name varchar(255) |
| 421 | +) /*$wgDBTableOptions*/; |
| 422 | +CREATE INDEX /*i*/tb_page ON /*_*/trackbacks (tb_page); |
| 423 | +CREATE TABLE /*_*/job ( |
| 424 | + job_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 425 | + job_cmd varbinary(60) NOT NULL default '', |
| 426 | + job_namespace int NOT NULL, |
| 427 | + job_title varchar(255) binary NOT NULL, |
| 428 | + job_params blob NOT NULL |
| 429 | +) /*$wgDBTableOptions*/; |
| 430 | +CREATE INDEX /*i*/job_cmd ON /*_*/job (job_cmd, job_namespace, job_title, job_params(128)); |
| 431 | +CREATE TABLE /*_*/querycache_info ( |
| 432 | + qci_type varbinary(32) NOT NULL default '', |
| 433 | + qci_timestamp binary(14) NOT NULL default '19700101000000' |
| 434 | +) /*$wgDBTableOptions*/; |
| 435 | +CREATE UNIQUE INDEX /*i*/qci_type ON /*_*/querycache_info (qci_type); |
| 436 | +CREATE TABLE /*_*/redirect ( |
| 437 | + rd_from int unsigned NOT NULL default 0 PRIMARY KEY, |
| 438 | + rd_namespace int NOT NULL default 0, |
| 439 | + rd_title varchar(255) binary NOT NULL default '', |
| 440 | + rd_interwiki varchar(32) default NULL, |
| 441 | + rd_fragment varchar(255) binary default NULL |
| 442 | +) /*$wgDBTableOptions*/; |
| 443 | +CREATE INDEX /*i*/rd_ns_title ON /*_*/redirect (rd_namespace,rd_title,rd_from); |
| 444 | +CREATE TABLE /*_*/querycachetwo ( |
| 445 | + qcc_type varbinary(32) NOT NULL, |
| 446 | + qcc_value int unsigned NOT NULL default 0, |
| 447 | + qcc_namespace int NOT NULL default 0, |
| 448 | + qcc_title varchar(255) binary NOT NULL default '', |
| 449 | + qcc_namespacetwo int NOT NULL default 0, |
| 450 | + qcc_titletwo varchar(255) binary NOT NULL default '' |
| 451 | +) /*$wgDBTableOptions*/; |
| 452 | +CREATE INDEX /*i*/qcc_type ON /*_*/querycachetwo (qcc_type,qcc_value); |
| 453 | +CREATE INDEX /*i*/qcc_title ON /*_*/querycachetwo (qcc_type,qcc_namespace,qcc_title); |
| 454 | +CREATE INDEX /*i*/qcc_titletwo ON /*_*/querycachetwo (qcc_type,qcc_namespacetwo,qcc_titletwo); |
| 455 | +CREATE TABLE /*_*/page_restrictions ( |
| 456 | + pr_page int NOT NULL, |
| 457 | + pr_type varbinary(60) NOT NULL, |
| 458 | + pr_level varbinary(60) NOT NULL, |
| 459 | + pr_cascade tinyint NOT NULL, |
| 460 | + pr_user int NULL, |
| 461 | + pr_expiry varbinary(14) NULL, |
| 462 | + pr_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT |
| 463 | +) /*$wgDBTableOptions*/; |
| 464 | +CREATE UNIQUE INDEX /*i*/pr_pagetype ON /*_*/page_restrictions (pr_page,pr_type); |
| 465 | +CREATE INDEX /*i*/pr_typelevel ON /*_*/page_restrictions (pr_type,pr_level); |
| 466 | +CREATE INDEX /*i*/pr_level ON /*_*/page_restrictions (pr_level); |
| 467 | +CREATE INDEX /*i*/pr_cascade ON /*_*/page_restrictions (pr_cascade); |
| 468 | +CREATE TABLE /*_*/protected_titles ( |
| 469 | + pt_namespace int NOT NULL, |
| 470 | + pt_title varchar(255) binary NOT NULL, |
| 471 | + pt_user int unsigned NOT NULL, |
| 472 | + pt_reason tinyblob, |
| 473 | + pt_timestamp binary(14) NOT NULL, |
| 474 | + pt_expiry varbinary(14) NOT NULL default '', |
| 475 | + pt_create_perm varbinary(60) NOT NULL |
| 476 | +) /*$wgDBTableOptions*/; |
| 477 | +CREATE UNIQUE INDEX /*i*/pt_namespace_title ON /*_*/protected_titles (pt_namespace,pt_title); |
| 478 | +CREATE INDEX /*i*/pt_timestamp ON /*_*/protected_titles (pt_timestamp); |
| 479 | +CREATE TABLE /*_*/page_props ( |
| 480 | + pp_page int NOT NULL, |
| 481 | + pp_propname varbinary(60) NOT NULL, |
| 482 | + pp_value blob NOT NULL |
| 483 | +) /*$wgDBTableOptions*/; |
| 484 | +CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname); |
| 485 | +CREATE TABLE /*_*/updatelog ( |
| 486 | + ul_key varchar(255) NOT NULL PRIMARY KEY, |
| 487 | + ul_value blob |
| 488 | +) /*$wgDBTableOptions*/; |
| 489 | +CREATE TABLE /*_*/change_tag ( |
| 490 | + ct_rc_id int NULL, |
| 491 | + ct_log_id int NULL, |
| 492 | + ct_rev_id int NULL, |
| 493 | + ct_tag varchar(255) NOT NULL, |
| 494 | + ct_params blob NULL |
| 495 | +) /*$wgDBTableOptions*/; |
| 496 | +CREATE UNIQUE INDEX /*i*/change_tag_rc_tag ON /*_*/change_tag (ct_rc_id,ct_tag); |
| 497 | +CREATE UNIQUE INDEX /*i*/change_tag_log_tag ON /*_*/change_tag (ct_log_id,ct_tag); |
| 498 | +CREATE UNIQUE INDEX /*i*/change_tag_rev_tag ON /*_*/change_tag (ct_rev_id,ct_tag); |
| 499 | +CREATE INDEX /*i*/change_tag_tag_id ON /*_*/change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id); |
| 500 | +CREATE TABLE /*_*/tag_summary ( |
| 501 | + ts_rc_id int NULL, |
| 502 | + ts_log_id int NULL, |
| 503 | + ts_rev_id int NULL, |
| 504 | + ts_tags blob NOT NULL |
| 505 | +) /*$wgDBTableOptions*/; |
| 506 | +CREATE UNIQUE INDEX /*i*/tag_summary_rc_id ON /*_*/tag_summary (ts_rc_id); |
| 507 | +CREATE UNIQUE INDEX /*i*/tag_summary_log_id ON /*_*/tag_summary (ts_log_id); |
| 508 | +CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id); |
| 509 | +CREATE TABLE /*_*/valid_tag ( |
| 510 | + vt_tag varchar(255) NOT NULL PRIMARY KEY |
| 511 | +) /*$wgDBTableOptions*/; |
| 512 | +CREATE TABLE /*_*/l10n_cache ( |
| 513 | + lc_lang varbinary(32) NOT NULL, |
| 514 | + lc_key varchar(255) NOT NULL, |
| 515 | + lc_value mediumblob NOT NULL |
| 516 | +) /*$wgDBTableOptions*/; |
| 517 | +CREATE INDEX /*i*/lc_lang_key ON /*_*/l10n_cache (lc_lang, lc_key); |
| 518 | +CREATE TABLE /*_*/msg_resource ( |
| 519 | + mr_resource varbinary(255) NOT NULL, |
| 520 | + mr_lang varbinary(32) NOT NULL, |
| 521 | + mr_blob mediumblob NOT NULL, |
| 522 | + mr_timestamp binary(14) NOT NULL |
| 523 | +) /*$wgDBTableOptions*/; |
| 524 | +CREATE UNIQUE INDEX /*i*/mr_resource_lang ON /*_*/msg_resource (mr_resource, mr_lang); |
| 525 | +CREATE TABLE /*_*/msg_resource_links ( |
| 526 | + mrl_resource varbinary(255) NOT NULL, |
| 527 | + mrl_message varbinary(255) NOT NULL |
| 528 | +) /*$wgDBTableOptions*/; |
| 529 | +CREATE UNIQUE INDEX /*i*/mrl_message_resource ON /*_*/msg_resource_links (mrl_message, mrl_resource); |
| 530 | +CREATE TABLE /*_*/module_deps ( |
| 531 | + md_module varbinary(255) NOT NULL, |
| 532 | + md_skin varbinary(32) NOT NULL, |
| 533 | + md_deps mediumblob NOT NULL |
| 534 | +) /*$wgDBTableOptions*/; |
| 535 | +CREATE UNIQUE INDEX /*i*/md_module_skin ON /*_*/module_deps (md_module, md_skin); |
| 536 | + |
Property changes on: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.18.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 537 | + native |
Index: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.13.sql |
— | — | @@ -0,0 +1,342 @@ |
| 2 | +-- This is a copy of SQLite schema from MediaWiki 1.13 used for updater testing |
| 3 | + |
| 4 | +CREATE TABLE /*$wgDBprefix*/user ( |
| 5 | + user_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 6 | + user_name varchar(255) default '', |
| 7 | + user_real_name varchar(255) default '', |
| 8 | + user_password tinyblob , |
| 9 | + user_newpassword tinyblob , |
| 10 | + user_newpass_time BLOB, |
| 11 | + user_email tinytext , |
| 12 | + user_options blob , |
| 13 | + user_touched BLOB default '', |
| 14 | + user_token BLOB default '', |
| 15 | + user_email_authenticated BLOB, |
| 16 | + user_email_token BLOB, |
| 17 | + user_email_token_expires BLOB, |
| 18 | + user_registration BLOB, |
| 19 | + user_editcount int) /*$wgDBTableOptions*/; |
| 20 | + |
| 21 | +CREATE TABLE /*$wgDBprefix*/user_groups ( |
| 22 | + ug_user INTEGER default '0', |
| 23 | + ug_group varBLOB default '') /*$wgDBTableOptions*/; |
| 24 | + |
| 25 | +CREATE TABLE /*$wgDBprefix*/user_newtalk ( |
| 26 | + user_id INTEGER default '0', |
| 27 | + user_ip varBLOB default '', |
| 28 | + user_last_timestamp BLOB default '') /*$wgDBTableOptions*/; |
| 29 | + |
| 30 | +CREATE TABLE /*$wgDBprefix*/page ( |
| 31 | + page_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 32 | + page_namespace INTEGER , |
| 33 | + page_title varchar(255) , |
| 34 | + page_restrictions tinyblob , |
| 35 | + page_counter bigint default '0', |
| 36 | + page_is_redirect tinyint default '0', |
| 37 | + page_is_new tinyint default '0', |
| 38 | + page_random real , |
| 39 | + page_touched BLOB default '', |
| 40 | + page_latest INTEGER , |
| 41 | + page_len INTEGER ) /*$wgDBTableOptions*/; |
| 42 | + |
| 43 | +CREATE TABLE /*$wgDBprefix*/revision ( |
| 44 | + rev_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 45 | + rev_page INTEGER , |
| 46 | + rev_text_id INTEGER , |
| 47 | + rev_comment tinyblob , |
| 48 | + rev_user INTEGER default '0', |
| 49 | + rev_user_text varchar(255) default '', |
| 50 | + rev_timestamp BLOB default '', |
| 51 | + rev_minor_edit tinyint default '0', |
| 52 | + rev_deleted tinyint default '0', |
| 53 | + rev_len int, |
| 54 | + rev_parent_id INTEGER default NULL) /*$wgDBTableOptions*/ ; |
| 55 | + |
| 56 | +CREATE TABLE /*$wgDBprefix*/text ( |
| 57 | + old_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 58 | + old_text mediumblob , |
| 59 | + old_flags tinyblob ) /*$wgDBTableOptions*/ ; |
| 60 | + |
| 61 | +CREATE TABLE /*$wgDBprefix*/archive ( |
| 62 | + ar_namespace INTEGER default '0', |
| 63 | + ar_title varchar(255) default '', |
| 64 | + ar_text mediumblob , |
| 65 | + ar_comment tinyblob , |
| 66 | + ar_user INTEGER default '0', |
| 67 | + ar_user_text varchar(255) , |
| 68 | + ar_timestamp BLOB default '', |
| 69 | + ar_minor_edit tinyint default '0', |
| 70 | + ar_flags tinyblob , |
| 71 | + ar_rev_id int, |
| 72 | + ar_text_id int, |
| 73 | + ar_deleted tinyint default '0', |
| 74 | + ar_len int, |
| 75 | + ar_page_id int, |
| 76 | + ar_parent_id INTEGER default NULL) /*$wgDBTableOptions*/; |
| 77 | + |
| 78 | +CREATE TABLE /*$wgDBprefix*/pagelinks ( |
| 79 | + pl_from INTEGER default '0', |
| 80 | + pl_namespace INTEGER default '0', |
| 81 | + pl_title varchar(255) default '') /*$wgDBTableOptions*/; |
| 82 | + |
| 83 | +CREATE TABLE /*$wgDBprefix*/templatelinks ( |
| 84 | + tl_from INTEGER default '0', |
| 85 | + tl_namespace INTEGER default '0', |
| 86 | + tl_title varchar(255) default '') /*$wgDBTableOptions*/; |
| 87 | + |
| 88 | +CREATE TABLE /*$wgDBprefix*/imagelinks ( |
| 89 | + il_from INTEGER default '0', |
| 90 | + il_to varchar(255) default '') /*$wgDBTableOptions*/; |
| 91 | + |
| 92 | +CREATE TABLE /*$wgDBprefix*/categorylinks ( |
| 93 | + cl_from INTEGER default '0', |
| 94 | + cl_to varchar(255) default '', |
| 95 | + cl_sortkey varchar(70) default '', |
| 96 | + cl_timestamp timestamp ) /*$wgDBTableOptions*/; |
| 97 | + |
| 98 | +CREATE TABLE /*$wgDBprefix*/category ( |
| 99 | + cat_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 100 | + cat_title varchar(255) , |
| 101 | + cat_pages INTEGER signed default 0, |
| 102 | + cat_subcats INTEGER signed default 0, |
| 103 | + cat_files INTEGER signed default 0, |
| 104 | + cat_hidden tinyint default 0) /*$wgDBTableOptions*/; |
| 105 | + |
| 106 | +CREATE TABLE /*$wgDBprefix*/externallinks ( |
| 107 | + el_from INTEGER default '0', |
| 108 | + el_to blob , |
| 109 | + el_index blob ) /*$wgDBTableOptions*/; |
| 110 | + |
| 111 | +CREATE TABLE /*$wgDBprefix*/langlinks ( |
| 112 | + ll_from INTEGER default '0', |
| 113 | + ll_lang varBLOB default '', |
| 114 | + ll_title varchar(255) default '') /*$wgDBTableOptions*/; |
| 115 | + |
| 116 | +CREATE TABLE /*$wgDBprefix*/site_stats ( |
| 117 | + ss_row_id INTEGER , |
| 118 | + ss_total_views bigint default '0', |
| 119 | + ss_total_edits bigint default '0', |
| 120 | + ss_good_articles bigint default '0', |
| 121 | + ss_total_pages bigint default '-1', |
| 122 | + ss_users bigint default '-1', |
| 123 | + ss_admins INTEGER default '-1', |
| 124 | + ss_images INTEGER default '0') /*$wgDBTableOptions*/; |
| 125 | + |
| 126 | +CREATE TABLE /*$wgDBprefix*/hitcounter ( |
| 127 | + hc_id INTEGER |
| 128 | +) ; |
| 129 | + |
| 130 | +CREATE TABLE /*$wgDBprefix*/ipblocks ( |
| 131 | + ipb_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 132 | + ipb_address tinyblob , |
| 133 | + ipb_user INTEGER default '0', |
| 134 | + ipb_by INTEGER default '0', |
| 135 | + ipb_by_text varchar(255) default '', |
| 136 | + ipb_reason tinyblob , |
| 137 | + ipb_timestamp BLOB default '', |
| 138 | + ipb_auto bool default 0, |
| 139 | + ipb_anon_only bool default 0, |
| 140 | + ipb_create_account bool default 1, |
| 141 | + ipb_enable_autoblock bool default '1', |
| 142 | + ipb_expiry varBLOB default '', |
| 143 | + ipb_range_start tinyblob , |
| 144 | + ipb_range_end tinyblob , |
| 145 | + ipb_deleted bool default 0, |
| 146 | + ipb_block_email bool default 0) /*$wgDBTableOptions*/; |
| 147 | + |
| 148 | +CREATE TABLE /*$wgDBprefix*/image ( |
| 149 | + img_name varchar(255) default '', |
| 150 | + img_size INTEGER default '0', |
| 151 | + img_width INTEGER default '0', |
| 152 | + img_height INTEGER default '0', |
| 153 | + img_metadata mediumblob , |
| 154 | + img_bits INTEGER default '0', |
| 155 | + img_media_type TEXT default NULL, |
| 156 | + img_major_mime TEXT default "unknown", |
| 157 | + img_minor_mime varBLOB default "unknown", |
| 158 | + img_description tinyblob , |
| 159 | + img_user INTEGER default '0', |
| 160 | + img_user_text varchar(255) , |
| 161 | + img_timestamp varBLOB default '', |
| 162 | + img_sha1 varBLOB default '') /*$wgDBTableOptions*/; |
| 163 | + |
| 164 | +CREATE TABLE /*$wgDBprefix*/oldimage ( |
| 165 | + oi_name varchar(255) default '', |
| 166 | + oi_archive_name varchar(255) default '', |
| 167 | + oi_size INTEGER default 0, |
| 168 | + oi_width INTEGER default 0, |
| 169 | + oi_height INTEGER default 0, |
| 170 | + oi_bits INTEGER default 0, |
| 171 | + oi_description tinyblob , |
| 172 | + oi_user INTEGER default '0', |
| 173 | + oi_user_text varchar(255) , |
| 174 | + oi_timestamp BLOB default '', |
| 175 | + oi_metadata mediumblob , |
| 176 | + oi_media_type TEXT default NULL, |
| 177 | + oi_major_mime TEXT default "unknown", |
| 178 | + oi_minor_mime varBLOB default "unknown", |
| 179 | + oi_deleted tinyint default '0', |
| 180 | + oi_sha1 varBLOB default '') /*$wgDBTableOptions*/; |
| 181 | + |
| 182 | +CREATE TABLE /*$wgDBprefix*/filearchive ( |
| 183 | + fa_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 184 | + fa_name varchar(255) default '', |
| 185 | + fa_archive_name varchar(255) default '', |
| 186 | + fa_storage_group varBLOB, |
| 187 | + fa_storage_key varBLOB default '', |
| 188 | + fa_deleted_user int, |
| 189 | + fa_deleted_timestamp BLOB default '', |
| 190 | + fa_deleted_reason text, |
| 191 | + fa_size INTEGER default '0', |
| 192 | + fa_width INTEGER default '0', |
| 193 | + fa_height INTEGER default '0', |
| 194 | + fa_metadata mediumblob, |
| 195 | + fa_bits INTEGER default '0', |
| 196 | + fa_media_type TEXT default NULL, |
| 197 | + fa_major_mime TEXT default "unknown", |
| 198 | + fa_minor_mime varBLOB default "unknown", |
| 199 | + fa_description tinyblob, |
| 200 | + fa_user INTEGER default '0', |
| 201 | + fa_user_text varchar(255) , |
| 202 | + fa_timestamp BLOB default '', |
| 203 | + fa_deleted tinyint default '0') /*$wgDBTableOptions*/; |
| 204 | + |
| 205 | +CREATE TABLE /*$wgDBprefix*/recentchanges ( |
| 206 | + rc_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 207 | + rc_timestamp varBLOB default '', |
| 208 | + rc_cur_time varBLOB default '', |
| 209 | + rc_user INTEGER default '0', |
| 210 | + rc_user_text varchar(255) , |
| 211 | + rc_namespace INTEGER default '0', |
| 212 | + rc_title varchar(255) default '', |
| 213 | + rc_comment varchar(255) default '', |
| 214 | + rc_minor tinyint default '0', |
| 215 | + rc_bot tinyint default '0', |
| 216 | + rc_new tinyint default '0', |
| 217 | + rc_cur_id INTEGER default '0', |
| 218 | + rc_this_oldid INTEGER default '0', |
| 219 | + rc_last_oldid INTEGER default '0', |
| 220 | + rc_type tinyint default '0', |
| 221 | + rc_moved_to_ns tinyint default '0', |
| 222 | + rc_moved_to_title varchar(255) default '', |
| 223 | + rc_patrolled tinyint default '0', |
| 224 | + rc_ip varBLOB default '', |
| 225 | + rc_old_len int, |
| 226 | + rc_new_len int, |
| 227 | + rc_deleted tinyint default '0', |
| 228 | + rc_logid INTEGER default '0', |
| 229 | + rc_log_type varBLOB NULL default NULL, |
| 230 | + rc_log_action varBLOB NULL default NULL, |
| 231 | + rc_params blob NULL) /*$wgDBTableOptions*/; |
| 232 | + |
| 233 | +CREATE TABLE /*$wgDBprefix*/watchlist ( |
| 234 | + wl_user INTEGER , |
| 235 | + wl_namespace INTEGER default '0', |
| 236 | + wl_title varchar(255) default '', |
| 237 | + wl_notificationtimestamp varBLOB) /*$wgDBTableOptions*/; |
| 238 | + |
| 239 | +CREATE TABLE /*$wgDBprefix*/math ( |
| 240 | + math_inputhash varBLOB , |
| 241 | + math_outputhash varBLOB , |
| 242 | + math_html_conservativeness tinyint , |
| 243 | + math_html text, |
| 244 | + math_mathml text) /*$wgDBTableOptions*/; |
| 245 | + |
| 246 | +CREATE TABLE /*$wgDBprefix*/searchindex ( |
| 247 | + si_page INTEGER , |
| 248 | + si_title varchar(255) default '', |
| 249 | + si_text mediumtext ) ; |
| 250 | + |
| 251 | +CREATE TABLE /*$wgDBprefix*/interwiki ( |
| 252 | + iw_prefix varchar(32) , |
| 253 | + iw_url blob , |
| 254 | + iw_local bool , |
| 255 | + iw_trans tinyint default 0) /*$wgDBTableOptions*/; |
| 256 | + |
| 257 | +CREATE TABLE /*$wgDBprefix*/querycache ( |
| 258 | + qc_type varBLOB , |
| 259 | + qc_value INTEGER default '0', |
| 260 | + qc_namespace INTEGER default '0', |
| 261 | + qc_title varchar(255) default '') /*$wgDBTableOptions*/; |
| 262 | + |
| 263 | +CREATE TABLE /*$wgDBprefix*/objectcache ( |
| 264 | + keyname varBLOB default '', |
| 265 | + value mediumblob, |
| 266 | + exptime datetime) /*$wgDBTableOptions*/; |
| 267 | + |
| 268 | +CREATE TABLE /*$wgDBprefix*/transcache ( |
| 269 | + tc_url varBLOB , |
| 270 | + tc_contents text, |
| 271 | + tc_time INTEGER ) /*$wgDBTableOptions*/; |
| 272 | + |
| 273 | +CREATE TABLE /*$wgDBprefix*/logging ( |
| 274 | + log_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 275 | + log_type varBLOB default '', |
| 276 | + log_action varBLOB default '', |
| 277 | + log_timestamp BLOB default '19700101000000', |
| 278 | + log_user INTEGER default 0, |
| 279 | + log_namespace INTEGER default 0, |
| 280 | + log_title varchar(255) default '', |
| 281 | + log_comment varchar(255) default '', |
| 282 | + log_params blob , |
| 283 | + log_deleted tinyint default '0') /*$wgDBTableOptions*/; |
| 284 | + |
| 285 | +CREATE TABLE /*$wgDBprefix*/trackbacks ( |
| 286 | + tb_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 287 | + tb_page INTEGER REFERENCES /*$wgDBprefix*/page(page_id) ON DELETE CASCADE, |
| 288 | + tb_title varchar(255) , |
| 289 | + tb_url blob , |
| 290 | + tb_ex text, |
| 291 | + tb_name varchar(255)) /*$wgDBTableOptions*/; |
| 292 | + |
| 293 | +CREATE TABLE /*$wgDBprefix*/job ( |
| 294 | + job_id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 295 | + job_cmd varBLOB default '', |
| 296 | + job_namespace INTEGER , |
| 297 | + job_title varchar(255) , |
| 298 | + job_params blob ) /*$wgDBTableOptions*/; |
| 299 | + |
| 300 | +CREATE TABLE /*$wgDBprefix*/querycache_info ( |
| 301 | + qci_type varBLOB default '', |
| 302 | + qci_timestamp BLOB default '19700101000000') /*$wgDBTableOptions*/; |
| 303 | + |
| 304 | +CREATE TABLE /*$wgDBprefix*/redirect ( |
| 305 | + rd_from INTEGER default '0', |
| 306 | + rd_namespace INTEGER default '0', |
| 307 | + rd_title varchar(255) default '') /*$wgDBTableOptions*/; |
| 308 | + |
| 309 | +CREATE TABLE /*$wgDBprefix*/querycachetwo ( |
| 310 | + qcc_type varBLOB , |
| 311 | + qcc_value INTEGER default '0', |
| 312 | + qcc_namespace INTEGER default '0', |
| 313 | + qcc_title varchar(255) default '', |
| 314 | + qcc_namespacetwo INTEGER default '0', |
| 315 | + qcc_titletwo varchar(255) default '') /*$wgDBTableOptions*/; |
| 316 | + |
| 317 | +CREATE TABLE /*$wgDBprefix*/page_restrictions ( |
| 318 | + pr_page INTEGER , |
| 319 | + pr_type varBLOB , |
| 320 | + pr_level varBLOB , |
| 321 | + pr_cascade tinyint , |
| 322 | + pr_user INTEGER NULL, |
| 323 | + pr_expiry varBLOB NULL, |
| 324 | + pr_id INTEGER PRIMARY KEY AUTOINCREMENT) /*$wgDBTableOptions*/; |
| 325 | + |
| 326 | +CREATE TABLE /*$wgDBprefix*/protected_titles ( |
| 327 | + pt_namespace INTEGER , |
| 328 | + pt_title varchar(255) , |
| 329 | + pt_user INTEGER , |
| 330 | + pt_reason tinyblob, |
| 331 | + pt_timestamp BLOB , |
| 332 | + pt_expiry varBLOB default '', |
| 333 | + pt_create_perm varBLOB ) /*$wgDBTableOptions*/; |
| 334 | + |
| 335 | +CREATE TABLE /*$wgDBprefix*/page_props ( |
| 336 | + pp_page INTEGER , |
| 337 | + pp_propname varBLOB , |
| 338 | + pp_value blob ) /*$wgDBTableOptions*/; |
| 339 | + |
| 340 | +CREATE TABLE /*$wgDBprefix*/updatelog ( |
| 341 | + ul_key varchar(255) ) /*$wgDBTableOptions*/; |
| 342 | + |
| 343 | + |
Property changes on: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.13.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 344 | + native |
Index: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.15.sql |
— | — | @@ -0,0 +1,454 @@ |
| 2 | +-- This is a copy of MediaWiki 1.15 schema shared by MySQL and SQLite. |
| 3 | +-- It is used for updater testing. Comments are stripped to decrease |
| 4 | +-- file size, as we don't need to maintain it. |
| 5 | + |
| 6 | +CREATE TABLE /*_*/user ( |
| 7 | + user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 8 | + user_name varchar(255) binary NOT NULL default '', |
| 9 | + user_real_name varchar(255) binary NOT NULL default '', |
| 10 | + user_password tinyblob NOT NULL, |
| 11 | + user_newpassword tinyblob NOT NULL, |
| 12 | + user_newpass_time binary(14), |
| 13 | + user_email tinytext NOT NULL, |
| 14 | + user_options blob NOT NULL, |
| 15 | + user_touched binary(14) NOT NULL default '', |
| 16 | + user_token binary(32) NOT NULL default '', |
| 17 | + user_email_authenticated binary(14), |
| 18 | + user_email_token binary(32), |
| 19 | + user_email_token_expires binary(14), |
| 20 | + user_registration binary(14), |
| 21 | + user_editcount int |
| 22 | +) /*$wgDBTableOptions*/; |
| 23 | +CREATE UNIQUE INDEX /*i*/user_name ON /*_*/user (user_name); |
| 24 | +CREATE INDEX /*i*/user_email_token ON /*_*/user (user_email_token); |
| 25 | +CREATE TABLE /*_*/user_groups ( |
| 26 | + ug_user int unsigned NOT NULL default 0, |
| 27 | + ug_group varbinary(16) NOT NULL default '' |
| 28 | +) /*$wgDBTableOptions*/; |
| 29 | +CREATE UNIQUE INDEX /*i*/ug_user_group ON /*_*/user_groups (ug_user,ug_group); |
| 30 | +CREATE INDEX /*i*/ug_group ON /*_*/user_groups (ug_group); |
| 31 | +CREATE TABLE /*_*/user_newtalk ( |
| 32 | + user_id int NOT NULL default 0, |
| 33 | + user_ip varbinary(40) NOT NULL default '', |
| 34 | + user_last_timestamp binary(14) NOT NULL default '' |
| 35 | +) /*$wgDBTableOptions*/; |
| 36 | +CREATE INDEX /*i*/un_user_id ON /*_*/user_newtalk (user_id); |
| 37 | +CREATE INDEX /*i*/un_user_ip ON /*_*/user_newtalk (user_ip); |
| 38 | +CREATE TABLE /*_*/page ( |
| 39 | + page_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 40 | + page_namespace int NOT NULL, |
| 41 | + page_title varchar(255) binary NOT NULL, |
| 42 | + page_restrictions tinyblob NOT NULL, |
| 43 | + page_counter bigint unsigned NOT NULL default 0, |
| 44 | + page_is_redirect tinyint unsigned NOT NULL default 0, |
| 45 | + page_is_new tinyint unsigned NOT NULL default 0, |
| 46 | + page_random real unsigned NOT NULL, |
| 47 | + page_touched binary(14) NOT NULL default '', |
| 48 | + page_latest int unsigned NOT NULL, |
| 49 | + page_len int unsigned NOT NULL |
| 50 | +) /*$wgDBTableOptions*/; |
| 51 | +CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title); |
| 52 | +CREATE INDEX /*i*/page_random ON /*_*/page (page_random); |
| 53 | +CREATE INDEX /*i*/page_len ON /*_*/page (page_len); |
| 54 | +CREATE TABLE /*_*/revision ( |
| 55 | + rev_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 56 | + rev_page int unsigned NOT NULL, |
| 57 | + rev_text_id int unsigned NOT NULL, |
| 58 | + rev_comment tinyblob NOT NULL, |
| 59 | + rev_user int unsigned NOT NULL default 0, |
| 60 | + rev_user_text varchar(255) binary NOT NULL default '', |
| 61 | + rev_timestamp binary(14) NOT NULL default '', |
| 62 | + rev_minor_edit tinyint unsigned NOT NULL default 0, |
| 63 | + rev_deleted tinyint unsigned NOT NULL default 0, |
| 64 | + rev_len int unsigned, |
| 65 | + rev_parent_id int unsigned default NULL |
| 66 | +) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024; |
| 67 | +CREATE UNIQUE INDEX /*i*/rev_page_id ON /*_*/revision (rev_page, rev_id); |
| 68 | +CREATE INDEX /*i*/rev_timestamp ON /*_*/revision (rev_timestamp); |
| 69 | +CREATE INDEX /*i*/page_timestamp ON /*_*/revision (rev_page,rev_timestamp); |
| 70 | +CREATE INDEX /*i*/user_timestamp ON /*_*/revision (rev_user,rev_timestamp); |
| 71 | +CREATE INDEX /*i*/usertext_timestamp ON /*_*/revision (rev_user_text,rev_timestamp); |
| 72 | +CREATE TABLE /*_*/text ( |
| 73 | + old_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 74 | + old_text mediumblob NOT NULL, |
| 75 | + old_flags tinyblob NOT NULL |
| 76 | +) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=10240; |
| 77 | +CREATE TABLE /*_*/archive ( |
| 78 | + ar_namespace int NOT NULL default 0, |
| 79 | + ar_title varchar(255) binary NOT NULL default '', |
| 80 | + ar_text mediumblob NOT NULL, |
| 81 | + ar_comment tinyblob NOT NULL, |
| 82 | + ar_user int unsigned NOT NULL default 0, |
| 83 | + ar_user_text varchar(255) binary NOT NULL, |
| 84 | + ar_timestamp binary(14) NOT NULL default '', |
| 85 | + ar_minor_edit tinyint NOT NULL default 0, |
| 86 | + ar_flags tinyblob NOT NULL, |
| 87 | + ar_rev_id int unsigned, |
| 88 | + ar_text_id int unsigned, |
| 89 | + ar_deleted tinyint unsigned NOT NULL default 0, |
| 90 | + ar_len int unsigned, |
| 91 | + ar_page_id int unsigned, |
| 92 | + ar_parent_id int unsigned default NULL |
| 93 | +) /*$wgDBTableOptions*/; |
| 94 | +CREATE INDEX /*i*/name_title_timestamp ON /*_*/archive (ar_namespace,ar_title,ar_timestamp); |
| 95 | +CREATE INDEX /*i*/ar_usertext_timestamp ON /*_*/archive (ar_user_text,ar_timestamp); |
| 96 | +CREATE TABLE /*_*/pagelinks ( |
| 97 | + pl_from int unsigned NOT NULL default 0, |
| 98 | + pl_namespace int NOT NULL default 0, |
| 99 | + pl_title varchar(255) binary NOT NULL default '' |
| 100 | +) /*$wgDBTableOptions*/; |
| 101 | +CREATE UNIQUE INDEX /*i*/pl_from ON /*_*/pagelinks (pl_from,pl_namespace,pl_title); |
| 102 | +CREATE UNIQUE INDEX /*i*/pl_namespace ON /*_*/pagelinks (pl_namespace,pl_title,pl_from); |
| 103 | +CREATE TABLE /*_*/templatelinks ( |
| 104 | + tl_from int unsigned NOT NULL default 0, |
| 105 | + tl_namespace int NOT NULL default 0, |
| 106 | + tl_title varchar(255) binary NOT NULL default '' |
| 107 | +) /*$wgDBTableOptions*/; |
| 108 | +CREATE UNIQUE INDEX /*i*/tl_from ON /*_*/templatelinks (tl_from,tl_namespace,tl_title); |
| 109 | +CREATE UNIQUE INDEX /*i*/tl_namespace ON /*_*/templatelinks (tl_namespace,tl_title,tl_from); |
| 110 | +CREATE TABLE /*_*/imagelinks ( |
| 111 | + il_from int unsigned NOT NULL default 0, |
| 112 | + il_to varchar(255) binary NOT NULL default '' |
| 113 | +) /*$wgDBTableOptions*/; |
| 114 | +CREATE UNIQUE INDEX /*i*/il_from ON /*_*/imagelinks (il_from,il_to); |
| 115 | +CREATE UNIQUE INDEX /*i*/il_to ON /*_*/imagelinks (il_to,il_from); |
| 116 | +CREATE TABLE /*_*/categorylinks ( |
| 117 | + cl_from int unsigned NOT NULL default 0, |
| 118 | + cl_to varchar(255) binary NOT NULL default '', |
| 119 | + cl_sortkey varchar(70) binary NOT NULL default '', |
| 120 | + cl_timestamp timestamp NOT NULL |
| 121 | +) /*$wgDBTableOptions*/; |
| 122 | +CREATE UNIQUE INDEX /*i*/cl_from ON /*_*/categorylinks (cl_from,cl_to); |
| 123 | +CREATE INDEX /*i*/cl_sortkey ON /*_*/categorylinks (cl_to,cl_sortkey,cl_from); |
| 124 | +CREATE INDEX /*i*/cl_timestamp ON /*_*/categorylinks (cl_to,cl_timestamp); |
| 125 | +CREATE TABLE /*_*/category ( |
| 126 | + cat_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 127 | + cat_title varchar(255) binary NOT NULL, |
| 128 | + cat_pages int signed NOT NULL default 0, |
| 129 | + cat_subcats int signed NOT NULL default 0, |
| 130 | + cat_files int signed NOT NULL default 0, |
| 131 | + cat_hidden tinyint unsigned NOT NULL default 0 |
| 132 | +) /*$wgDBTableOptions*/; |
| 133 | +CREATE UNIQUE INDEX /*i*/cat_title ON /*_*/category (cat_title); |
| 134 | +CREATE INDEX /*i*/cat_pages ON /*_*/category (cat_pages); |
| 135 | +CREATE TABLE /*_*/externallinks ( |
| 136 | + el_from int unsigned NOT NULL default 0, |
| 137 | + el_to blob NOT NULL, |
| 138 | + el_index blob NOT NULL |
| 139 | +) /*$wgDBTableOptions*/; |
| 140 | +CREATE INDEX /*i*/el_from ON /*_*/externallinks (el_from, el_to(40)); |
| 141 | +CREATE INDEX /*i*/el_to ON /*_*/externallinks (el_to(60), el_from); |
| 142 | +CREATE INDEX /*i*/el_index ON /*_*/externallinks (el_index(60)); |
| 143 | +CREATE TABLE /*_*/langlinks ( |
| 144 | + ll_from int unsigned NOT NULL default 0, |
| 145 | + |
| 146 | + ll_lang varbinary(20) NOT NULL default '', |
| 147 | + ll_title varchar(255) binary NOT NULL default '' |
| 148 | +) /*$wgDBTableOptions*/; |
| 149 | +CREATE UNIQUE INDEX /*i*/ll_from ON /*_*/langlinks (ll_from, ll_lang); |
| 150 | +CREATE INDEX /*i*/ll_lang ON /*_*/langlinks (ll_lang, ll_title); |
| 151 | +CREATE TABLE /*_*/site_stats ( |
| 152 | + ss_row_id int unsigned NOT NULL, |
| 153 | + ss_total_views bigint unsigned default 0, |
| 154 | + ss_total_edits bigint unsigned default 0, |
| 155 | + ss_good_articles bigint unsigned default 0, |
| 156 | + ss_total_pages bigint default '-1', |
| 157 | + ss_users bigint default '-1', |
| 158 | + ss_active_users bigint default '-1', |
| 159 | + ss_admins int default '-1', |
| 160 | + ss_images int default 0 |
| 161 | +) /*$wgDBTableOptions*/; |
| 162 | +CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id); |
| 163 | +CREATE TABLE /*_*/hitcounter ( |
| 164 | + hc_id int unsigned NOT NULL |
| 165 | +) ENGINE=HEAP MAX_ROWS=25000; |
| 166 | +CREATE TABLE /*_*/ipblocks ( |
| 167 | + ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 168 | + ipb_address tinyblob NOT NULL, |
| 169 | + ipb_user int unsigned NOT NULL default 0, |
| 170 | + ipb_by int unsigned NOT NULL default 0, |
| 171 | + ipb_by_text varchar(255) binary NOT NULL default '', |
| 172 | + ipb_reason tinyblob NOT NULL, |
| 173 | + ipb_timestamp binary(14) NOT NULL default '', |
| 174 | + ipb_auto bool NOT NULL default 0, |
| 175 | + ipb_anon_only bool NOT NULL default 0, |
| 176 | + ipb_create_account bool NOT NULL default 1, |
| 177 | + ipb_enable_autoblock bool NOT NULL default '1', |
| 178 | + ipb_expiry varbinary(14) NOT NULL default '', |
| 179 | + ipb_range_start tinyblob NOT NULL, |
| 180 | + ipb_range_end tinyblob NOT NULL, |
| 181 | + ipb_deleted bool NOT NULL default 0, |
| 182 | + ipb_block_email bool NOT NULL default 0, |
| 183 | + ipb_allow_usertalk bool NOT NULL default 0 |
| 184 | +) /*$wgDBTableOptions*/; |
| 185 | + |
| 186 | +CREATE UNIQUE INDEX /*i*/ipb_address ON /*_*/ipblocks (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only); |
| 187 | +CREATE INDEX /*i*/ipb_user ON /*_*/ipblocks (ipb_user); |
| 188 | +CREATE INDEX /*i*/ipb_range ON /*_*/ipblocks (ipb_range_start(8), ipb_range_end(8)); |
| 189 | +CREATE INDEX /*i*/ipb_timestamp ON /*_*/ipblocks (ipb_timestamp); |
| 190 | +CREATE INDEX /*i*/ipb_expiry ON /*_*/ipblocks (ipb_expiry); |
| 191 | +CREATE TABLE /*_*/image ( |
| 192 | + img_name varchar(255) binary NOT NULL default '' PRIMARY KEY, |
| 193 | + img_size int unsigned NOT NULL default 0, |
| 194 | + img_width int NOT NULL default 0, |
| 195 | + img_height int NOT NULL default 0, |
| 196 | + img_metadata mediumblob NOT NULL, |
| 197 | + img_bits int NOT NULL default 0, |
| 198 | + img_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 199 | + img_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown", |
| 200 | + img_minor_mime varbinary(32) NOT NULL default "unknown", |
| 201 | + img_description tinyblob NOT NULL, |
| 202 | + img_user int unsigned NOT NULL default 0, |
| 203 | + img_user_text varchar(255) binary NOT NULL, |
| 204 | + img_timestamp varbinary(14) NOT NULL default '', |
| 205 | + img_sha1 varbinary(32) NOT NULL default '' |
| 206 | +) /*$wgDBTableOptions*/; |
| 207 | +CREATE INDEX /*i*/img_usertext_timestamp ON /*_*/image (img_user_text,img_timestamp); |
| 208 | +CREATE INDEX /*i*/img_size ON /*_*/image (img_size); |
| 209 | +CREATE INDEX /*i*/img_timestamp ON /*_*/image (img_timestamp); |
| 210 | +CREATE INDEX /*i*/img_sha1 ON /*_*/image (img_sha1); |
| 211 | +CREATE TABLE /*_*/oldimage ( |
| 212 | + oi_name varchar(255) binary NOT NULL default '', |
| 213 | + oi_archive_name varchar(255) binary NOT NULL default '', |
| 214 | + oi_size int unsigned NOT NULL default 0, |
| 215 | + oi_width int NOT NULL default 0, |
| 216 | + oi_height int NOT NULL default 0, |
| 217 | + oi_bits int NOT NULL default 0, |
| 218 | + oi_description tinyblob NOT NULL, |
| 219 | + oi_user int unsigned NOT NULL default 0, |
| 220 | + oi_user_text varchar(255) binary NOT NULL, |
| 221 | + oi_timestamp binary(14) NOT NULL default '', |
| 222 | + oi_metadata mediumblob NOT NULL, |
| 223 | + oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 224 | + oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown", |
| 225 | + oi_minor_mime varbinary(32) NOT NULL default "unknown", |
| 226 | + oi_deleted tinyint unsigned NOT NULL default 0, |
| 227 | + oi_sha1 varbinary(32) NOT NULL default '' |
| 228 | +) /*$wgDBTableOptions*/; |
| 229 | +CREATE INDEX /*i*/oi_usertext_timestamp ON /*_*/oldimage (oi_user_text,oi_timestamp); |
| 230 | +CREATE INDEX /*i*/oi_name_timestamp ON /*_*/oldimage (oi_name,oi_timestamp); |
| 231 | +CREATE INDEX /*i*/oi_name_archive_name ON /*_*/oldimage (oi_name,oi_archive_name(14)); |
| 232 | +CREATE INDEX /*i*/oi_sha1 ON /*_*/oldimage (oi_sha1); |
| 233 | +CREATE TABLE /*_*/filearchive ( |
| 234 | + fa_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 235 | + fa_name varchar(255) binary NOT NULL default '', |
| 236 | + fa_archive_name varchar(255) binary default '', |
| 237 | + fa_storage_group varbinary(16), |
| 238 | + fa_storage_key varbinary(64) default '', |
| 239 | + fa_deleted_user int, |
| 240 | + fa_deleted_timestamp binary(14) default '', |
| 241 | + fa_deleted_reason text, |
| 242 | + fa_size int unsigned default 0, |
| 243 | + fa_width int default 0, |
| 244 | + fa_height int default 0, |
| 245 | + fa_metadata mediumblob, |
| 246 | + fa_bits int default 0, |
| 247 | + fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL, |
| 248 | + fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") default "unknown", |
| 249 | + fa_minor_mime varbinary(32) default "unknown", |
| 250 | + fa_description tinyblob, |
| 251 | + fa_user int unsigned default 0, |
| 252 | + fa_user_text varchar(255) binary, |
| 253 | + fa_timestamp binary(14) default '', |
| 254 | + fa_deleted tinyint unsigned NOT NULL default 0 |
| 255 | +) /*$wgDBTableOptions*/; |
| 256 | +CREATE INDEX /*i*/fa_name ON /*_*/filearchive (fa_name, fa_timestamp); |
| 257 | +CREATE INDEX /*i*/fa_storage_group ON /*_*/filearchive (fa_storage_group, fa_storage_key); |
| 258 | +CREATE INDEX /*i*/fa_deleted_timestamp ON /*_*/filearchive (fa_deleted_timestamp); |
| 259 | +CREATE INDEX /*i*/fa_user_timestamp ON /*_*/filearchive (fa_user_text,fa_timestamp); |
| 260 | +CREATE TABLE /*_*/recentchanges ( |
| 261 | + rc_id int NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 262 | + rc_timestamp varbinary(14) NOT NULL default '', |
| 263 | + rc_cur_time varbinary(14) NOT NULL default '', |
| 264 | + rc_user int unsigned NOT NULL default 0, |
| 265 | + rc_user_text varchar(255) binary NOT NULL, |
| 266 | + rc_namespace int NOT NULL default 0, |
| 267 | + rc_title varchar(255) binary NOT NULL default '', |
| 268 | + rc_comment varchar(255) binary NOT NULL default '', |
| 269 | + rc_minor tinyint unsigned NOT NULL default 0, |
| 270 | + rc_bot tinyint unsigned NOT NULL default 0, |
| 271 | + rc_new tinyint unsigned NOT NULL default 0, |
| 272 | + rc_cur_id int unsigned NOT NULL default 0, |
| 273 | + rc_this_oldid int unsigned NOT NULL default 0, |
| 274 | + rc_last_oldid int unsigned NOT NULL default 0, |
| 275 | + rc_type tinyint unsigned NOT NULL default 0, |
| 276 | + rc_moved_to_ns tinyint unsigned NOT NULL default 0, |
| 277 | + rc_moved_to_title varchar(255) binary NOT NULL default '', |
| 278 | + rc_patrolled tinyint unsigned NOT NULL default 0, |
| 279 | + rc_ip varbinary(40) NOT NULL default '', |
| 280 | + rc_old_len int, |
| 281 | + rc_new_len int, |
| 282 | + rc_deleted tinyint unsigned NOT NULL default 0, |
| 283 | + rc_logid int unsigned NOT NULL default 0, |
| 284 | + rc_log_type varbinary(255) NULL default NULL, |
| 285 | + rc_log_action varbinary(255) NULL default NULL, |
| 286 | + rc_params blob NULL |
| 287 | +) /*$wgDBTableOptions*/; |
| 288 | +CREATE INDEX /*i*/rc_timestamp ON /*_*/recentchanges (rc_timestamp); |
| 289 | +CREATE INDEX /*i*/rc_namespace_title ON /*_*/recentchanges (rc_namespace, rc_title); |
| 290 | +CREATE INDEX /*i*/rc_cur_id ON /*_*/recentchanges (rc_cur_id); |
| 291 | +CREATE INDEX /*i*/new_name_timestamp ON /*_*/recentchanges (rc_new,rc_namespace,rc_timestamp); |
| 292 | +CREATE INDEX /*i*/rc_ip ON /*_*/recentchanges (rc_ip); |
| 293 | +CREATE INDEX /*i*/rc_ns_usertext ON /*_*/recentchanges (rc_namespace, rc_user_text); |
| 294 | +CREATE INDEX /*i*/rc_user_text ON /*_*/recentchanges (rc_user_text, rc_timestamp); |
| 295 | +CREATE TABLE /*_*/watchlist ( |
| 296 | + wl_user int unsigned NOT NULL, |
| 297 | + wl_namespace int NOT NULL default 0, |
| 298 | + wl_title varchar(255) binary NOT NULL default '', |
| 299 | + wl_notificationtimestamp varbinary(14) |
| 300 | +) /*$wgDBTableOptions*/; |
| 301 | +CREATE UNIQUE INDEX /*i*/wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title); |
| 302 | +CREATE INDEX /*i*/namespace_title ON /*_*/watchlist (wl_namespace, wl_title); |
| 303 | +CREATE TABLE /*_*/math ( |
| 304 | + math_inputhash varbinary(16) NOT NULL, |
| 305 | + math_outputhash varbinary(16) NOT NULL, |
| 306 | + math_html_conservativeness tinyint NOT NULL, |
| 307 | + math_html text, |
| 308 | + math_mathml text |
| 309 | +) /*$wgDBTableOptions*/; |
| 310 | +CREATE UNIQUE INDEX /*i*/math_inputhash ON /*_*/math (math_inputhash); |
| 311 | +CREATE TABLE /*_*/searchindex ( |
| 312 | + si_page int unsigned NOT NULL, |
| 313 | + si_title varchar(255) NOT NULL default '', |
| 314 | + si_text mediumtext NOT NULL |
| 315 | +) ENGINE=MyISAM; |
| 316 | +CREATE UNIQUE INDEX /*i*/si_page ON /*_*/searchindex (si_page); |
| 317 | +CREATE FULLTEXT INDEX /*i*/si_title ON /*_*/searchindex (si_title); |
| 318 | +CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text); |
| 319 | +CREATE TABLE /*_*/interwiki ( |
| 320 | + iw_prefix varchar(32) NOT NULL, |
| 321 | + iw_url blob NOT NULL, |
| 322 | + iw_local bool NOT NULL, |
| 323 | + iw_trans tinyint NOT NULL default 0 |
| 324 | +) /*$wgDBTableOptions*/; |
| 325 | +CREATE UNIQUE INDEX /*i*/iw_prefix ON /*_*/interwiki (iw_prefix); |
| 326 | +CREATE TABLE /*_*/querycache ( |
| 327 | + qc_type varbinary(32) NOT NULL, |
| 328 | + qc_value int unsigned NOT NULL default 0, |
| 329 | + qc_namespace int NOT NULL default 0, |
| 330 | + qc_title varchar(255) binary NOT NULL default '' |
| 331 | +) /*$wgDBTableOptions*/; |
| 332 | +CREATE INDEX /*i*/qc_type ON /*_*/querycache (qc_type,qc_value); |
| 333 | +CREATE TABLE /*_*/objectcache ( |
| 334 | + keyname varbinary(255) NOT NULL default '' PRIMARY KEY, |
| 335 | + value mediumblob, |
| 336 | + exptime datetime |
| 337 | +) /*$wgDBTableOptions*/; |
| 338 | +CREATE INDEX /*i*/exptime ON /*_*/objectcache (exptime); |
| 339 | +CREATE TABLE /*_*/transcache ( |
| 340 | + tc_url varbinary(255) NOT NULL, |
| 341 | + tc_contents text, |
| 342 | + tc_time int NOT NULL |
| 343 | +) /*$wgDBTableOptions*/; |
| 344 | +CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url); |
| 345 | +CREATE TABLE /*_*/logging ( |
| 346 | + log_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 347 | + log_type varbinary(10) NOT NULL default '', |
| 348 | + log_action varbinary(10) NOT NULL default '', |
| 349 | + log_timestamp binary(14) NOT NULL default '19700101000000', |
| 350 | + log_user int unsigned NOT NULL default 0, |
| 351 | + log_namespace int NOT NULL default 0, |
| 352 | + log_title varchar(255) binary NOT NULL default '', |
| 353 | + log_comment varchar(255) NOT NULL default '', |
| 354 | + log_params blob NOT NULL, |
| 355 | + log_deleted tinyint unsigned NOT NULL default 0 |
| 356 | +) /*$wgDBTableOptions*/; |
| 357 | +CREATE INDEX /*i*/type_time ON /*_*/logging (log_type, log_timestamp); |
| 358 | +CREATE INDEX /*i*/user_time ON /*_*/logging (log_user, log_timestamp); |
| 359 | +CREATE INDEX /*i*/page_time ON /*_*/logging (log_namespace, log_title, log_timestamp); |
| 360 | +CREATE INDEX /*i*/times ON /*_*/logging (log_timestamp); |
| 361 | +CREATE TABLE /*_*/trackbacks ( |
| 362 | + tb_id int PRIMARY KEY AUTO_INCREMENT, |
| 363 | + tb_page int REFERENCES /*_*/page(page_id) ON DELETE CASCADE, |
| 364 | + tb_title varchar(255) NOT NULL, |
| 365 | + tb_url blob NOT NULL, |
| 366 | + tb_ex text, |
| 367 | + tb_name varchar(255) |
| 368 | +) /*$wgDBTableOptions*/; |
| 369 | +CREATE INDEX /*i*/tb_page ON /*_*/trackbacks (tb_page); |
| 370 | +CREATE TABLE /*_*/job ( |
| 371 | + job_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, |
| 372 | + job_cmd varbinary(60) NOT NULL default '', |
| 373 | + job_namespace int NOT NULL, |
| 374 | + job_title varchar(255) binary NOT NULL, |
| 375 | + job_params blob NOT NULL |
| 376 | +) /*$wgDBTableOptions*/; |
| 377 | +CREATE INDEX /*i*/job_cmd ON /*_*/job (job_cmd, job_namespace, job_title); |
| 378 | +CREATE TABLE /*_*/querycache_info ( |
| 379 | + qci_type varbinary(32) NOT NULL default '', |
| 380 | + qci_timestamp binary(14) NOT NULL default '19700101000000' |
| 381 | +) /*$wgDBTableOptions*/; |
| 382 | +CREATE UNIQUE INDEX /*i*/qci_type ON /*_*/querycache_info (qci_type); |
| 383 | +CREATE TABLE /*_*/redirect ( |
| 384 | + rd_from int unsigned NOT NULL default 0 PRIMARY KEY, |
| 385 | + rd_namespace int NOT NULL default 0, |
| 386 | + rd_title varchar(255) binary NOT NULL default '' |
| 387 | +) /*$wgDBTableOptions*/; |
| 388 | +CREATE INDEX /*i*/rd_ns_title ON /*_*/redirect (rd_namespace,rd_title,rd_from); |
| 389 | +CREATE TABLE /*_*/querycachetwo ( |
| 390 | + qcc_type varbinary(32) NOT NULL, |
| 391 | + qcc_value int unsigned NOT NULL default 0, |
| 392 | + qcc_namespace int NOT NULL default 0, |
| 393 | + qcc_title varchar(255) binary NOT NULL default '', |
| 394 | + qcc_namespacetwo int NOT NULL default 0, |
| 395 | + qcc_titletwo varchar(255) binary NOT NULL default '' |
| 396 | +) /*$wgDBTableOptions*/; |
| 397 | +CREATE INDEX /*i*/qcc_type ON /*_*/querycachetwo (qcc_type,qcc_value); |
| 398 | +CREATE INDEX /*i*/qcc_title ON /*_*/querycachetwo (qcc_type,qcc_namespace,qcc_title); |
| 399 | +CREATE INDEX /*i*/qcc_titletwo ON /*_*/querycachetwo (qcc_type,qcc_namespacetwo,qcc_titletwo); |
| 400 | +CREATE TABLE /*_*/page_restrictions ( |
| 401 | + pr_page int NOT NULL, |
| 402 | + pr_type varbinary(60) NOT NULL, |
| 403 | + pr_level varbinary(60) NOT NULL, |
| 404 | + pr_cascade tinyint NOT NULL, |
| 405 | + pr_user int NULL, |
| 406 | + pr_expiry varbinary(14) NULL, |
| 407 | + pr_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT |
| 408 | +) /*$wgDBTableOptions*/; |
| 409 | +CREATE UNIQUE INDEX /*i*/pr_pagetype ON /*_*/page_restrictions (pr_page,pr_type); |
| 410 | +CREATE INDEX /*i*/pr_typelevel ON /*_*/page_restrictions (pr_type,pr_level); |
| 411 | +CREATE INDEX /*i*/pr_level ON /*_*/page_restrictions (pr_level); |
| 412 | +CREATE INDEX /*i*/pr_cascade ON /*_*/page_restrictions (pr_cascade); |
| 413 | +CREATE TABLE /*_*/protected_titles ( |
| 414 | + pt_namespace int NOT NULL, |
| 415 | + pt_title varchar(255) binary NOT NULL, |
| 416 | + pt_user int unsigned NOT NULL, |
| 417 | + pt_reason tinyblob, |
| 418 | + pt_timestamp binary(14) NOT NULL, |
| 419 | + pt_expiry varbinary(14) NOT NULL default '', |
| 420 | + pt_create_perm varbinary(60) NOT NULL |
| 421 | +) /*$wgDBTableOptions*/; |
| 422 | +CREATE UNIQUE INDEX /*i*/pt_namespace_title ON /*_*/protected_titles (pt_namespace,pt_title); |
| 423 | +CREATE INDEX /*i*/pt_timestamp ON /*_*/protected_titles (pt_timestamp); |
| 424 | +CREATE TABLE /*_*/page_props ( |
| 425 | + pp_page int NOT NULL, |
| 426 | + pp_propname varbinary(60) NOT NULL, |
| 427 | + pp_value blob NOT NULL |
| 428 | +) /*$wgDBTableOptions*/; |
| 429 | +CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname); |
| 430 | +CREATE TABLE /*_*/updatelog ( |
| 431 | + ul_key varchar(255) NOT NULL PRIMARY KEY |
| 432 | +) /*$wgDBTableOptions*/; |
| 433 | +CREATE TABLE /*_*/change_tag ( |
| 434 | + ct_rc_id int NULL, |
| 435 | + ct_log_id int NULL, |
| 436 | + ct_rev_id int NULL, |
| 437 | + ct_tag varchar(255) NOT NULL, |
| 438 | + ct_params blob NULL |
| 439 | +) /*$wgDBTableOptions*/; |
| 440 | +CREATE UNIQUE INDEX /*i*/change_tag_rc_tag ON /*_*/change_tag (ct_rc_id,ct_tag); |
| 441 | +CREATE UNIQUE INDEX /*i*/change_tag_log_tag ON /*_*/change_tag (ct_log_id,ct_tag); |
| 442 | +CREATE UNIQUE INDEX /*i*/change_tag_rev_tag ON /*_*/change_tag (ct_rev_id,ct_tag); |
| 443 | +CREATE INDEX /*i*/change_tag_tag_id ON /*_*/change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id); |
| 444 | +CREATE TABLE /*_*/tag_summary ( |
| 445 | + ts_rc_id int NULL, |
| 446 | + ts_log_id int NULL, |
| 447 | + ts_rev_id int NULL, |
| 448 | + ts_tags blob NOT NULL |
| 449 | +) /*$wgDBTableOptions*/; |
| 450 | +CREATE UNIQUE INDEX /*i*/tag_summary_rc_id ON /*_*/tag_summary (ts_rc_id); |
| 451 | +CREATE UNIQUE INDEX /*i*/tag_summary_log_id ON /*_*/tag_summary (ts_log_id); |
| 452 | +CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id); |
| 453 | +CREATE TABLE /*_*/valid_tag ( |
| 454 | + vt_tag varchar(255) NOT NULL PRIMARY KEY |
| 455 | +) /*$wgDBTableOptions*/; |
Property changes on: trunk/phase3/tests/phpunit/data/db/sqlite/tables-1.15.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 456 | + native |