r105806 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105805‎ | r105806 | r105807 >
Date:16:56, 11 December 2011
Author:maxsem
Status:ok
Tags:
Comment:
Added 1.18 schema to tests, comment
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/db/DatabaseSqliteTest.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/db/sqlite/tables-1.18.sql (added) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/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/includes/db/sqlite/tables-1.18.sql
___________________________________________________________________
Added: svn:eol-style
1537 + native
Index: trunk/phase3/tests/phpunit/includes/db/DatabaseSqliteTest.php
@@ -191,6 +191,7 @@
192192 '1.15',
193193 '1.16',
194194 '1.17',
 195+ '1.18',
195196 );
196197
197198 // Mismatches for these columns we can safely ignore
@@ -266,7 +267,7 @@
267268 $list = array_flip( $db->listTables() );
268269 $excluded = array(
269270 'math', // moved out of core in 1.18
270 - 'trackbacks',
 271+ 'trackbacks', // removed from core in 1.19
271272 'searchindex',
272273 'searchindex_content',
273274 'searchindex_segments',

Status & tagging log