From 6f485997c8ca82e89c46eb153fc8c5f93cbb9375 Mon Sep 17 00:00:00 2001 From: barbushin <barbushin@gmail.com> Date: Tue, 14 Jul 2015 16:56:28 +0300 Subject: [PATCH] Use new (not deprecated) update methods --- core/Updates/2.14.1-b2.php | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/core/Updates/2.14.1-b2.php b/core/Updates/2.14.1-b2.php index 8762fedc18..7d03020ee3 100644 --- a/core/Updates/2.14.1-b2.php +++ b/core/Updates/2.14.1-b2.php @@ -13,16 +13,10 @@ use Piwik\Common; use Piwik\Updater; use Piwik\Updates; -/** - * Update for version 2.14.0. - */ + class Updates_2_14_1_b2 extends Updates { - /** - * Here you can define one or multiple SQL statements that should be executed during the update. - * @return array - */ - static function getSql() + public function getMigrationQueries(Updater $updater) { $updateSql = array( 'ALTER TABLE `' . Common::prefixTable('site') . '` ADD COLUMN `exclude_unknown_urls` TINYINT(1) DEFAULT 0 AFTER `currency`' => array(1060) @@ -30,12 +24,8 @@ class Updates_2_14_1_b2 extends Updates return $updateSql; } - /** - * Here you can define any action that should be performed during the update. For instance executing SQL statements, - * renaming config entries, updating files, etc. - */ - static function update() + public function doUpdate(Updater $updater) { - Updater::updateDatabase(__FILE__, self::getSql()); + $updater->executeMigrationQueries(__FILE__, $this->getMigrationQueries($updater)); } } -- GitLab