adding two public convenience function wrappers: dropExtensionField and dropExtension...
authorThomas Gries <wikinaut@users.mediawiki.org>
Wed, 14 Mar 2012 20:16:32 +0000 (20:16 +0000)
committerThomas Gries <wikinaut@users.mediawiki.org>
Wed, 14 Mar 2012 20:16:32 +0000 (20:16 +0000)
includes/installer/DatabaseUpdater.php

index f2e36ae..b28d7dc 100644 (file)
@@ -202,6 +202,30 @@ abstract class DatabaseUpdater {
                $this->extensionUpdates[] = array( 'addField', $tableName, $columnName, $sqlPath, true );
        }
 
+       /**
+        *
+        * @since 1.20
+        *
+        * @param $tableName string
+        * @param $columnName string
+        * @param $sqlPath string
+        */
+       public function dropExtensionField( $tableName, $columnName, $sqlPath ) {
+               $this->extensionUpdates[] = array( 'dropField', $tableName, $columnName, $sqlPath, true );
+       }
+
+       /**
+        *
+        * @since 1.20
+        *
+        * @param $tableName string
+        * @param $sqlPath string
+        */
+       public function dropExtensionTable( $tableName, $patch, $fullpath = false ) {
+               $this->extensionUpdates[] = array( 'dropTable', $tableName, $sqlPath, true );
+       }
+
+
        /**
         * Add a maintenance script to be run after the database updates are complete.
         *