public function execute() {
$dbw = $this->getDB( DB_MASTER );
+ $updater = DatabaseUpdater::newForDB( $dbw, true, $this );
+
foreach ( $this->mArgs as $arg ) {
$files = [
$arg,
- $dbw->patchPath( $arg ),
- $dbw->patchPath( "patch-$arg.sql" ),
+ $updater->patchPath( $dbw, $arg ),
+ $updater->patchPath( $dbw, "patch-$arg.sql" ),
];
foreach ( $files as $file ) {
if ( file_exists( $file ) ) {