array( 'addTable', 'config', 'patch-config.sql' ),
array( 'addIndex', 'ipblocks', 'i05', 'patch-ipblocks_i05_index.sql' ),
array( 'addIndex', 'revision', 'i05', 'patch-revision_i05_index.sql' ),
array( 'addTable', 'config', 'patch-config.sql' ),
array( 'addIndex', 'ipblocks', 'i05', 'patch-ipblocks_i05_index.sql' ),
array( 'addIndex', 'revision', 'i05', 'patch-revision_i05_index.sql' ),
array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
array( 'addField', 'revision', 'rev_content_format', 'patch-revision-rev_content_format.sql' ),
array( 'addField', 'revision', 'rev_content_model', 'patch-revision-rev_content_model.sql' ),
array( 'addField', 'archive', 'ar_content_format', 'patch-archive-ar_content_format.sql' ),
array( 'addField', 'archive', 'ar_content_model', 'patch-archive-ar_content_model.sql' ),
array( 'addField', 'page', 'page_content_model', 'patch-page-page_content_model.sql' ),
+ array( 'dropField', 'site_stats', 'ss_admins', 'patch-ss_admins.sql' ),
+ array( 'dropField', 'recentchanges', 'rc_moved_to_title', 'patch-rc_moved.sql' ),
// KEEP THIS AT THE BOTTOM!!
array( 'doRebuildDuplicateFunction' ),
// KEEP THIS AT THE BOTTOM!!
array( 'doRebuildDuplicateFunction' ),
* Oracle inserts NULL, so namespace fields should have a default value
*/
protected function doNamespaceDefaults() {
* Oracle inserts NULL, so namespace fields should have a default value
*/
protected function doNamespaceDefaults() {
$meta = $this->db->fieldInfo( 'page', 'page_namespace' );
if ( $meta->defaultValue() != null ) {
$meta = $this->db->fieldInfo( 'page', 'page_namespace' );
if ( $meta->defaultValue() != null ) {
- $this->applyPatch( 'patch_namespace_defaults.sql', false );
- $this->output( "ok\n" );
+ $this->applyPatch( 'patch_namespace_defaults.sql', false, "Altering namespace fields with default value" );
$meta = $this->db->query( 'SELECT COUNT(*) cnt FROM user_constraints WHERE constraint_type = \'R\' AND deferrable = \'DEFERRABLE\'' );
$row = $meta->fetchRow();
if ( $row && $row['cnt'] > 0 ) {
$meta = $this->db->query( 'SELECT COUNT(*) cnt FROM user_constraints WHERE constraint_type = \'R\' AND deferrable = \'DEFERRABLE\'' );
$row = $meta->fetchRow();
if ( $row && $row['cnt'] > 0 ) {
- $this->applyPatch( 'patch_fk_rename_deferred.sql', false );
- $this->output( "ok\n" );
+ $this->applyPatch( 'patch_fk_rename_deferred.sql', false, "Altering foreign keys ... " );
- $this->output( "Recreating functions ... " );
- $this->applyPatch( 'patch_create_17_functions.sql', false );
- $this->output( "ok\n" );
+ $this->applyPatch( 'patch_create_17_functions.sql', false, "Recreating functions" );
// check if iwlinks table exists which was added in 1.17
if ( $this->db->tableExists( 'iwlinks' ) ) {
// check if iwlinks table exists which was added in 1.17
if ( $this->db->tableExists( 'iwlinks' ) ) {
- $this->applyPatch( 'patch_16_17_schema_changes.sql', false );
- $this->output( "ok\n" );
+ $this->applyPatch( 'patch_16_17_schema_changes.sql', false, "Updating schema to 17" );
$meta = $this->db->fieldInfo( 'categorylinks' , 'cl_sortkey_prefix' );
if ( $meta->isNullable() ) {
$meta = $this->db->fieldInfo( 'categorylinks' , 'cl_sortkey_prefix' );
if ( $meta->isNullable() ) {
- $this->applyPatch( 'patch_remove_not_null_empty_defs.sql', false );
- $this->output( "ok\n" );
+ $this->applyPatch( 'patch_remove_not_null_empty_defs.sql', false, "Removing not null empty constraints" );
$meta = $this->db->fieldInfo( 'ipblocks' , 'ipb_by_text' );
if ( $meta->isNullable() ) {
$meta = $this->db->fieldInfo( 'ipblocks' , 'ipb_by_text' );
if ( $meta->isNullable() ) {
- $this->applyPatch( 'patch_remove_not_null_empty_defs2.sql', false );
- $this->output( "ok\n" );
+ $this->applyPatch( 'patch_remove_not_null_empty_defs2.sql', false, "Removing not null empty constraints" );
* cascading taken in account in the deleting function
*/
protected function doRecentchangesFK2Cascade() {
* cascading taken in account in the deleting function
*/
protected function doRecentchangesFK2Cascade() {
$meta = $this->db->query( 'SELECT 1 FROM all_constraints WHERE owner = \''.strtoupper($this->db->getDBname()).'\' AND constraint_name = \''.$this->db->tablePrefix().'RECENTCHANGES_FK2\' AND delete_rule = \'CASCADE\'' );
$row = $meta->fetchRow();
if ( $row ) {
$meta = $this->db->query( 'SELECT 1 FROM all_constraints WHERE owner = \''.strtoupper($this->db->getDBname()).'\' AND constraint_name = \''.$this->db->tablePrefix().'RECENTCHANGES_FK2\' AND delete_rule = \'CASCADE\'' );
$row = $meta->fetchRow();
if ( $row ) {
- $this->applyPatch( 'patch_recentchanges_fk2_cascade.sql', false );
- $this->output( "ok\n" );
+ $this->applyPatch( 'patch_recentchanges_fk2_cascade.sql', false, "Altering RECENTCHANGES_FK2" );
* rebuilding of the function that duplicates tables for tests
*/
protected function doRebuildDuplicateFunction() {
* rebuilding of the function that duplicates tables for tests
*/
protected function doRebuildDuplicateFunction() {
- $this->output( "Rebuilding duplicate function ... " );
- $this->applyPatch( 'patch_rebuild_dupfunc.sql', false );
- $this->output( "ok\n" );
+ $this->applyPatch( 'patch_rebuild_dupfunc.sql', false, "Rebuilding duplicate function" );