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/1.9-b9.php')
-rwxr-xr-xcore/Updates/1.9-b9.php65
1 files changed, 31 insertions, 34 deletions
diff --git a/core/Updates/1.9-b9.php b/core/Updates/1.9-b9.php
index 53e45e276a..f986381d97 100755
--- a/core/Updates/1.9-b9.php
+++ b/core/Updates/1.9-b9.php
@@ -14,44 +14,41 @@
*/
class Piwik_Updates_1_9_b9 extends Piwik_Updates
{
- static function isMajorUpdate()
- {
- return true;
- }
-
- static function getSql($schema = 'Myisam')
- {
- $logVisit = Piwik_Common::prefixTable('log_visit');
- $logConversion = Piwik_Common::prefixTable('log_conversion');
-
- $addColumns = "DROP `location_continent`,
+ static function isMajorUpdate()
+ {
+ return true;
+ }
+
+ static function getSql($schema = 'Myisam')
+ {
+ $logVisit = Piwik_Common::prefixTable('log_visit');
+ $logConversion = Piwik_Common::prefixTable('log_conversion');
+
+ $addColumns = "DROP `location_continent`,
ADD `location_region` CHAR(2) NULL AFTER `location_country`,
ADD `location_city` VARCHAR(255) NULL AFTER `location_region`,
ADD `location_latitude` FLOAT(10, 6) NULL AFTER `location_city`,
ADD `location_longitude` FLOAT(10, 6) NULL AFTER `location_latitude`";
-
- return array(
- // add geoip columns to log_visit
- "ALTER TABLE `$logVisit` $addColumns" => 1091,
-
- // add geoip columns to log_conversion
- "ALTER TABLE `$logConversion` $addColumns" => 1091,
- );
- }
- static function update()
- {
- try
- {
- self::enableMaintenanceMode();
- Piwik_Updater::updateDatabase(__FILE__, self::getSql());
- self::disableMaintenanceMode();
- }
- catch (Exception $e)
- {
- self::disableMaintenanceMode();
- throw $e;
- }
- }
+ return array(
+ // add geoip columns to log_visit
+ "ALTER TABLE `$logVisit` $addColumns" => 1091,
+
+ // add geoip columns to log_conversion
+ "ALTER TABLE `$logConversion` $addColumns" => 1091,
+ );
+ }
+
+ static function update()
+ {
+ try {
+ self::enableMaintenanceMode();
+ Piwik_Updater::updateDatabase(__FILE__, self::getSql());
+ self::disableMaintenanceMode();
+ } catch (Exception $e) {
+ self::disableMaintenanceMode();
+ throw $e;
+ }
+ }
}