Merge "Chinese Conversion Table Update 2017-6"
[lhc/web/wiklou.git] / includes / installer / DatabaseUpdater.php
index a317822..242f148 100644 (file)
@@ -179,12 +179,12 @@ abstract class DatabaseUpdater {
        /**
         * @param Database $db
         * @param bool $shared
-        * @param Maintenance $maintenance
+        * @param Maintenance|null $maintenance
         *
         * @throws MWException
         * @return DatabaseUpdater
         */
-       public static function newForDB( Database $db, $shared = false, $maintenance = null ) {
+       public static function newForDB( Database $db, $shared = false, Maintenance $maintenance = null ) {
                $type = $db->getType();
                if ( in_array( $type, Installer::getDBTypes() ) ) {
                        $class = ucfirst( $type ) . 'Updater';
@@ -340,12 +340,22 @@ abstract class DatabaseUpdater {
         *
         * @param string $tableName The table name
         * @param string $fieldName The field to be modified
-        * @param string $sqlPath The path to the SQL change path
+        * @param string $sqlPath The path to the SQL patch
         */
        public function modifyExtensionField( $tableName, $fieldName, $sqlPath ) {
                $this->extensionUpdates[] = [ 'modifyField', $tableName, $fieldName, $sqlPath, true ];
        }
 
+       /**
+        * @since 1.31
+        *
+        * @param string $tableName The table name
+        * @param string $sqlPath The path to the SQL patch
+        */
+       public function modifyExtensionTable( $tableName, $sqlPath ) {
+               $this->extensionUpdates[] = [ 'modifyTable', $tableName, $sqlPath, true ];
+       }
+
        /**
         *
         * @since 1.20
@@ -606,7 +616,7 @@ abstract class DatabaseUpdater {
         * 1.13...) with the values being arrays of updates, identical to how
         * updaters.inc did it (for now)
         *
-        * @return array
+        * @return array[]
         */
        abstract protected function getCoreUpdateList();