Merge "Revised styling of sister-search sidebar."
[lhc/web/wiklou.git] / includes / installer / MssqlUpdater.php
index 1175e9e..1a9915d 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Deployment
  */
 
+use Wikimedia\Rdbms\DatabaseMssql;
+
 /**
  * Class for setting up the MediaWiki database using Microsoft SQL Server.
  *
@@ -94,6 +96,11 @@ class MssqlUpdater extends DatabaseUpdater {
                                'patch-add-rc_name_type_patrolled_timestamp_index.sql' ],
                        [ 'addField', 'change_tag', 'ct_id', 'patch-change_tag-ct_id.sql' ],
                        [ 'addField', 'tag_summary', 'ts_id', 'patch-tag_summary-ts_id.sql' ],
+
+                       // 1.29
+                       [ 'addField', 'externallinks', 'el_index_60', 'patch-externallinks-el_index_60.sql' ],
+                       [ 'dropIndex', 'oldimage', 'oi_name_archive_name',
+                               'patch-alter-table-oldimage.sql' ],
                ];
        }
 
@@ -107,7 +114,9 @@ class MssqlUpdater extends DatabaseUpdater {
 
        /**
         * General schema update for a table that touches more than one field or requires
-        * destructive actions (such as dropping and recreating the table).
+        * destructive actions (such as dropping and recreating the table). NOTE: Usage of
+        * this function is highly discouraged, use it's successor DatabaseUpdater::modifyTable
+        * instead.
         *
         * @param string $table
         * @param string $updatekey
@@ -120,9 +129,11 @@ class MssqlUpdater extends DatabaseUpdater {
                } elseif ( $this->updateRowExists( $updatekey ) ) {
                        $this->output( "...$table already had schema updated by $patch.\n" );
                } else {
-                       $this->insertUpdateRow( $updatekey );
-
-                       return $this->applyPatch( $patch, $fullpath, "Updating schema of table $table" );
+                       $apply = $this->applyPatch( $patch, $fullpath, "Updating schema of table $table" );
+                       if ( $apply ) {
+                               $this->insertUpdateRow( $updatekey );
+                       }
+                       return $apply;
                }
 
                return true;