diff options
Diffstat (limited to 'core/Updates/0.4.php')
-rw-r--r-- | core/Updates/0.4.php | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/core/Updates/0.4.php b/core/Updates/0.4.php index cdd9911bdd..a0ac958c11 100644 --- a/core/Updates/0.4.php +++ b/core/Updates/0.4.php @@ -13,25 +13,19 @@ /** * @package Updates */ -class Piwik_Updates_0_4 extends Piwik_Updates +class Piwik_Updates_0_4 implements Piwik_iUpdate { - static function getSql($adapter = 'PDO_MYSQL') + static function update() { - return array( - // 0.4 [1140] - 'UPDATE `'. Piwik_Common::prefixTable('log_visit') .'` + Piwik_Updater::updateDatabase(__FILE__, array( + 'UPDATE `'. Piwik::prefixTable('log_visit') .'` SET location_ip=location_ip+CAST(POW(2,32) AS UNSIGNED) WHERE location_ip < 0' => false, - 'ALTER TABLE `'. Piwik_Common::prefixTable('log_visit') .'` + 'ALTER TABLE `'. Piwik::prefixTable('log_visit') .'` CHANGE `location_ip` `location_ip` BIGINT UNSIGNED NOT NULL' => false, - 'UPDATE `'. Piwik_Common::prefixTable('logger_api_call') .'` + 'UPDATE `'. Piwik::prefixTable('logger_api_call') .'` SET caller_ip=caller_ip+CAST(POW(2,32) AS UNSIGNED) WHERE caller_ip < 0' => false, - 'ALTER TABLE `'. Piwik_Common::prefixTable('logger_api_call') .'` + 'ALTER TABLE `'. Piwik::prefixTable('logger_api_call') .'` CHANGE `caller_ip` `caller_ip` BIGINT UNSIGNED' => false, - ); - } - - static function update() - { - Piwik_Updater::updateDatabase(__FILE__, self::getSql()); + )); } } |