X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=blobdiff_plain;f=includes%2Finstaller%2FPostgresUpdater.php;h=8b3fb37f38ba607f65100c53a3e2000f83cc6e01;hb=c00c34f288c13b5360e30c694d929e4c65e3a3a1;hp=9ba8d027e44ee6d428e4df6c423aa1b7eca31115;hpb=044d888c41427967cd6f14303d300ceefa54d0c5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index 9ba8d027e4..8b3fb37f38 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -476,6 +476,11 @@ class PostgresUpdater extends DatabaseUpdater { [ 'changeNullableField', 'protected_titles', 'pt_reason', 'NOT NULL', true ], [ 'addPgField', 'protected_titles', 'pt_reason_id', 'INTEGER NOT NULL DEFAULT 0' ], [ 'addTable', 'comment', 'patch-comment-table.sql' ], + [ 'addTable', 'revision_comment_temp', 'patch-revision_comment_temp-table.sql' ], + // image_comment_temp is no longer needed when upgrading to MW 1.31 or newer, + // as it is dropped later in the update process as part of 'migrateImageCommentTemp'. + // File kept on disk and the updater entry here for historical purposes. + // [ 'addTable', 'image_comment_temp', 'patch-image_comment_temp-table.sql' ], // This field was added in 1.31, but is put here so it can be used by 'migrateComments' [ 'addPgField', 'image', 'img_description_id', 'INTEGER NOT NULL DEFAULT 0' ], @@ -839,7 +844,7 @@ END; if ( !$this->db->tableExists( $table, __METHOD__ ) ) { $this->output( "...skipping: '$table' table doesn't exist yet.\n" ); - return; + return true; } // Second requirement: the new index must be missing @@ -853,17 +858,18 @@ END; " $old should be manually removed if not needed anymore.\n" ); } - return; + return true; } // Third requirement: the old index must exist if ( !$this->db->indexExists( $table, $old, __METHOD__ ) ) { $this->output( "...skipping: index $old doesn't exist.\n" ); - return; + return true; } $this->db->query( "ALTER INDEX $old RENAME TO $new" ); + return true; } protected function dropPgField( $table, $field ) { @@ -1070,7 +1076,7 @@ END; $this->db->query( $command ); } else { $this->output( "...foreign key constraint on '$table.$field' already does not exist\n" ); - }; + } } protected function changeFkeyDeferrable( $table, $field, $clause ) { @@ -1234,7 +1240,7 @@ END; if ( $this->updateRowExists( 'patch-textsearch_bug66650.sql' ) ) { $this->output( "...T68650 already fixed or not applicable.\n" ); return; - }; + } $this->applyPatch( 'patch-textsearch_bug66650.sql', false, 'Rebuilding text search for T68650' ); }