MediaWiki  1.23.8
SqliteUpdater.php
Go to the documentation of this file.
1 <?php
31 
32  protected function getCoreUpdateList() {
33  return array(
34  array( 'disableContentHandlerUseDB' ),
35 
36  // 1.14
37  array( 'addField', 'site_stats', 'ss_active_users', 'patch-ss_active_users.sql' ),
38  array( 'doActiveUsersInit' ),
39  array( 'addField', 'ipblocks', 'ipb_allow_usertalk', 'patch-ipb_allow_usertalk.sql' ),
40  array( 'sqliteInitialIndexes' ),
41 
42  // 1.15
43  array( 'addTable', 'change_tag', 'patch-change_tag.sql' ),
44  array( 'addTable', 'tag_summary', 'patch-tag_summary.sql' ),
45  array( 'addTable', 'valid_tag', 'patch-valid_tag.sql' ),
46 
47  // 1.16
48  array( 'addTable', 'user_properties', 'patch-user_properties.sql' ),
49  array( 'addTable', 'log_search', 'patch-log_search.sql' ),
50  array( 'addField', 'logging', 'log_user_text', 'patch-log_user_text.sql' ),
51  # listed separately from the previous update because 1.16 was released without this update
52  array( 'doLogUsertextPopulation' ),
53  array( 'doLogSearchPopulation' ),
54  array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
55  array( 'addIndex', 'log_search', 'ls_field_val', 'patch-log_search-rename-index.sql' ),
56  array( 'addIndex', 'change_tag', 'change_tag_rc_tag', 'patch-change_tag-indexes.sql' ),
57  array( 'addField', 'redirect', 'rd_interwiki', 'patch-rd_interwiki.sql' ),
58  array( 'doUpdateTranscacheField' ),
59  array( 'sqliteSetupSearchindex' ),
60 
61  // 1.17
62  array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
63  array( 'addIndex', 'iwlinks', 'iwl_prefix_title_from', 'patch-rename-iwl_prefix.sql' ),
64  array( 'addField', 'updatelog', 'ul_value', 'patch-ul_value.sql' ),
65  array( 'addField', 'interwiki', 'iw_api', 'patch-iw_api_and_wikiid.sql' ),
66  array( 'dropIndex', 'iwlinks', 'iwl_prefix', 'patch-kill-iwl_prefix.sql' ),
67  array( 'addField', 'categorylinks', 'cl_collation', 'patch-categorylinks-better-collation.sql' ),
68  array( 'doCollationUpdate' ),
69  array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
70  array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
71  array( 'dropIndex', 'archive', 'ar_page_revid', 'patch-archive_kill_ar_page_revid.sql' ),
72  array( 'addIndex', 'archive', 'ar_revid', 'patch-archive_ar_revid.sql' ),
73 
74  // 1.18
75  array( 'addIndex', 'user', 'user_email', 'patch-user_email_index.sql' ),
76  array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
77  array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql' ),
78 
79  // 1.19
80  array( 'addIndex', 'logging', 'type_action', 'patch-logging-type-action-index.sql' ),
81  array( 'doMigrateUserOptions' ),
82  array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
83  array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
84  array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ),
85  array( 'addIndex', 'page', 'page_redirect_namespace_len',
86  'patch-page_redirect_namespace_len.sql' ),
87  array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-uploadstash_chunk.sql' ),
88  array( 'addfield', 'job', 'job_timestamp', 'patch-jobs-add-timestamp.sql' ),
89 
90  // 1.20
91  array( 'addIndex', 'revision', 'page_user_timestamp', 'patch-revision-user-page-index.sql' ),
92  array( 'addField', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id.sql' ),
93  array( 'addIndex', 'ipblocks', 'ipb_parent_block_id', 'patch-ipb-parent-block-id-index.sql' ),
94  array( 'dropField', 'category', 'cat_hidden', 'patch-cat_hidden.sql' ),
95 
96  // 1.21
97  array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
98  array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
99  array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
100  array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
101  array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
102  array( 'enableContentHandlerUseDB' ),
103 
104  array( 'dropField', 'site_stats', 'ss_admins', 'patch-drop-ss_admins.sql' ),
105  array( 'dropField', 'recentchanges', 'rc_moved_to_title', 'patch-rc_moved.sql' ),
106  array( 'addTable', 'sites', 'patch-sites.sql' ),
107  array( 'addField', 'filearchive', 'fa_sha1', 'patch-fa_sha1.sql' ),
108  array( 'addField', 'job', 'job_token', 'patch-job_token.sql' ),
109  array( 'addField', 'job', 'job_attempts', 'patch-job_attempts.sql' ),
110  array( 'doEnableProfiling' ),
111  array( 'addField', 'uploadstash', 'us_props', 'patch-uploadstash-us_props.sql' ),
112  array( 'modifyField', 'user_groups', 'ug_group', 'patch-ug_group-length-increase-255.sql' ),
113  array( 'modifyField', 'user_former_groups', 'ufg_group',
114  'patch-ufg_group-length-increase-255.sql' ),
115  array( 'addIndex', 'page_props', 'pp_propname_page',
116  'patch-page_props-propname-page-index.sql' ),
117  array( 'addIndex', 'image', 'img_media_mime', 'patch-img_media_mime-index.sql' ),
118 
119  // 1.22
120  array( 'addIndex', 'iwlinks', 'iwl_prefix_from_title', 'patch-iwlinks-from-title-index.sql' ),
121  array( 'addField', 'archive', 'ar_id', 'patch-archive-ar_id.sql' ),
122  array( 'addField', 'externallinks', 'el_id', 'patch-externallinks-el_id.sql' ),
123 
124  // 1.23
125  array( 'addField', 'recentchanges', 'rc_source', 'patch-rc_source.sql' ),
126  array( 'addIndex', 'logging', 'log_user_text_type_time',
127  'patch-logging_user_text_type_time_index.sql' ),
128  array( 'addIndex', 'logging', 'log_user_text_time', 'patch-logging_user_text_time_index.sql' ),
129  array( 'addField', 'page', 'page_links_updated', 'patch-page_links_updated.sql' ),
130  array( 'addField', 'user', 'user_password_expires', 'patch-user_password_expire.sql' ),
131  );
132  }
133 
134  protected function sqliteInitialIndexes() {
135  // initial-indexes.sql fails if the indexes are already present,
136  // so we perform a quick check if our database is newer.
137  if ( $this->updateRowExists( 'initial_indexes' ) ||
138  $this->db->indexExists( 'user', 'user_name', __METHOD__ )
139  ) {
140  $this->output( "...have initial indexes\n" );
141 
142  return;
143  }
144  $this->applyPatch( 'initial-indexes.sql', false, "Adding initial indexes" );
145  }
146 
147  protected function sqliteSetupSearchindex() {
149  $fts3tTable = $this->updateRowExists( 'fts3' );
150  if ( $fts3tTable && !$module ) {
151  $this->applyPatch(
152  'searchindex-no-fts.sql',
153  false,
154  'PHP is missing FTS3 support, downgrading tables'
155  );
156  } elseif ( !$fts3tTable && $module == 'FTS3' ) {
157  $this->applyPatch( 'searchindex-fts3.sql', false, "Adding FTS3 search capabilities" );
158  } else {
159  $this->output( "...fulltext search table appears to be in order.\n" );
160  }
161  }
162 
163  protected function doEnableProfiling() {
164  global $wgProfileToDatabase;
165  if ( $wgProfileToDatabase === true && !$this->db->tableExists( 'profiling', __METHOD__ ) ) {
166  $this->applyPatch( 'patch-profiling.sql', false, 'Add profiling table' );
167  }
168  }
169 }
DatabaseUpdater\output
output( $str)
Output some text.
Definition: DatabaseUpdater.php:184
DatabaseUpdater\applyPatch
applyPatch( $path, $isFullPath=false, $msg=null)
Applies a SQL patch.
Definition: DatabaseUpdater.php:623
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
DatabaseUpdater
Class for handling database updates.
Definition: DatabaseUpdater.php:33
SqliteUpdater\sqliteSetupSearchindex
sqliteSetupSearchindex()
Definition: SqliteUpdater.php:147
SqliteUpdater\doEnableProfiling
doEnableProfiling()
Definition: SqliteUpdater.php:163
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
SqliteUpdater\sqliteInitialIndexes
sqliteInitialIndexes()
Definition: SqliteUpdater.php:134
DatabaseUpdater\updateRowExists
updateRowExists( $key)
Helper function: check if the given key is present in the updatelog table.
Definition: DatabaseUpdater.php:470
SqliteUpdater\getCoreUpdateList
getCoreUpdateList()
Get an array of updates to perform on the database.
Definition: SqliteUpdater.php:32
from
Please log in again after you receive it</td >< td > s a saved copy from
Definition: All_system_messages.txt:3297
SqliteUpdater
Class for handling updates to Sqlite databases.
Definition: SqliteUpdater.php:30
DatabaseSqlite\getFulltextSearchModule
static getFulltextSearchModule()
Returns version of currently supported SQLite fulltext search module or false if none present.
Definition: DatabaseSqlite.php:196