resourceloader: Remove obsolete msg_resource database table
[lhc/web/wiklou.git] / includes / installer / PostgresUpdater.php
index e1063b0..7880557 100644 (file)
@@ -85,8 +85,6 @@ class PostgresUpdater extends DatabaseUpdater {
                        array( 'addTable', 'log_search', 'patch-log_search.sql' ),
                        array( 'addTable', 'l10n_cache', 'patch-l10n_cache.sql' ),
                        array( 'addTable', 'iwlinks', 'patch-iwlinks.sql' ),
-                       array( 'addTable', 'msg_resource', 'patch-msg_resource.sql' ),
-                       array( 'addTable', 'msg_resource_links', 'patch-msg_resource_links.sql' ),
                        array( 'addTable', 'module_deps', 'patch-module_deps.sql' ),
                        array( 'addTable', 'uploadstash', 'patch-uploadstash.sql' ),
                        array( 'addTable', 'user_former_groups', 'patch-user_former_groups.sql' ),
@@ -250,7 +248,8 @@ class PostgresUpdater extends DatabaseUpdater {
                        array( 'addPgIndex', 'recentchanges', 'rc_timestamp_bot', '(rc_timestamp) WHERE rc_bot = 0' ),
                        array( 'addPgIndex', 'templatelinks', 'templatelinks_from', '(tl_from)' ),
                        array( 'addPgIndex', 'watchlist', 'wl_user', '(wl_user)' ),
-                       array( 'addPgIndex', 'watchlist', 'wl_user_notificationtimestamp', '(wl_user, wl_notificationtimestamp)' ),
+                       array( 'addPgIndex', 'watchlist', 'wl_user_notificationtimestamp',
+                               '(wl_user, wl_notificationtimestamp)' ),
                        array( 'addPgIndex', 'logging', 'logging_user_type_time',
                                '(log_user, log_type, log_timestamp)' ),
                        array( 'addPgIndex', 'logging', 'logging_page_id_time', '(log_page,log_timestamp)' ),
@@ -423,7 +422,11 @@ class PostgresUpdater extends DatabaseUpdater {
                        array( 'dropTable', 'hitcounter' ),
                        array( 'dropField', 'site_stats', 'ss_total_views', 'patch-drop-ss_total_views.sql' ),
                        array( 'dropField', 'page', 'page_counter', 'patch-drop-page_counter.sql' ),
-                       array( 'dropFkey', 'recentchanges', 'rc_cur_id' )
+                       array( 'dropFkey', 'recentchanges', 'rc_cur_id' ),
+
+                       // 1.27
+                       array( 'dropTable', 'msg_resource_links' ),
+                       array( 'dropTable', 'msg_resource' ),
                );
        }
 
@@ -511,7 +514,8 @@ END;
                if ( !$res ) {
                        return null;
                }
-               if ( !( $r = $this->db->fetchRow( $res ) ) ) {
+               $r = $this->db->fetchRow( $res );
+               if ( !$r ) {
                        return null;
                }
 
@@ -531,7 +535,8 @@ END;
                        if ( !$r2 ) {
                                return null;
                        }
-                       if ( !( $row2 = $this->db->fetchRow( $r2 ) ) ) {
+                       $row2 = $this->db->fetchRow( $r2 );
+                       if ( !$row2 ) {
                                return null;
                        }
                        $colnames[] = $row2[0];
@@ -554,7 +559,8 @@ END;
                                $this->db->addQuotes( $fkey )
                        )
                );
-               if ( !( $row = $this->db->fetchRow( $r ) ) ) {
+               $row = $this->db->fetchRow( $r );
+               if ( !$row ) {
                        return null;
                }
 
@@ -691,8 +697,8 @@ END;
        }
 
        protected function changeFieldPurgeTable( $table, $field, $newtype, $default ) {
-               ## For a cache table, empty it if the field needs to be changed, because the old contents
-               ## may be corrupted.  If the column is already the desired type, refrain from purging.
+               # # For a cache table, empty it if the field needs to be changed, because the old contents
+               # # may be corrupted.  If the column is already the desired type, refrain from purging.
                $fi = $this->db->fieldInfo( $table, $field );
                if ( is_null( $fi ) ) {
                        $this->output( "...ERROR: expected column $table.$field to exist\n" );
@@ -955,6 +961,7 @@ END;
                        $this->output( "...bug 66650 already fixed or not applicable.\n" );
                        return true;
                };
-               $this->applyPatch( 'patch-textsearch_bug66650.sql', false, "Rebuilding text search for bug 66650" );
+               $this->applyPatch( 'patch-textsearch_bug66650.sql', false,
+                       'Rebuilding text search for bug 66650' );
        }
 }