Welcome to mirror list, hosted at ThFree Co, Russian Federation.

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