Merge "Add missing @throw tags to IDatabase/Database"
[lhc/web/wiklou.git] / includes / installer / DatabaseUpdater.php
index 752bc54..54ff712 100644 (file)
@@ -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
@@ -988,19 +998,27 @@ abstract class DatabaseUpdater {
        }
 
        /**
-        * Purge the objectcache table
+        * Purge various database caches
         */
        public function purgeCache() {
                global $wgLocalisationCacheConf;
-               # We can't guarantee that the user will be able to use TRUNCATE,
-               # but we know that DELETE is available to us
+               // We can't guarantee that the user will be able to use TRUNCATE,
+               // but we know that DELETE is available to us
                $this->output( "Purging caches..." );
+
+               // ObjectCache
                $this->db->delete( 'objectcache', '*', __METHOD__ );
+
+               // LocalisationCache
                if ( $wgLocalisationCacheConf['manualRecache'] ) {
                        $this->rebuildLocalisationCache();
                }
+
+               // ResourceLoader: Message cache
                $blobStore = new MessageBlobStore();
                $blobStore->clear();
+
+               // ResourceLoader: File-dependency cache
                $this->db->delete( 'module_deps', '*', __METHOD__ );
                $this->output( "done.\n" );
        }