From 1fc9bcb398dc1a699aed6ee4cf058e1bc5cf1ad0 Mon Sep 17 00:00:00 2001 From: Thomas Gries Date: Wed, 14 Mar 2012 20:16:32 +0000 Subject: [PATCH] adding two public convenience function wrappers: dropExtensionField and dropExtensionTable --- includes/installer/DatabaseUpdater.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index f2e36aec2b..b28d7dc6ab 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -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. * -- 2.20.1