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:
authormattpiwik <matthieu.aubry@gmail.com>2009-03-25 09:03:45 +0300
committermattpiwik <matthieu.aubry@gmail.com>2009-03-25 09:03:45 +0300
commit7ab6ec204061b025a2b88bfc35043f8117fe0a08 (patch)
tree532e0ec9357be9dd044ed206a98b6b73a3d5238d /core/Updates/0.2.33.php
parent6eaac034d7d26af7f60552e73da704f6b8a9ac62 (diff)
- refs #310 adding updates so that all existing tables and all fields are converted to utf8 for consistent piwik tables
git-svn-id: http://dev.piwik.org/svn/trunk@1020 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Updates/0.2.33.php')
-rw-r--r--core/Updates/0.2.33.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Updates/0.2.33.php b/core/Updates/0.2.33.php
index b3df11c51e..bc2d2904be 100644
--- a/core/Updates/0.2.33.php
+++ b/core/Updates/0.2.33.php
@@ -1,5 +1,14 @@
<?php
require_once "SitesManager/API.php";
+
+// alter table to set the utf8 collation
+$tablesToAlter = Piwik::getTablesInstalled(true);
+foreach($tablesToAlter as $table) {
+ Piwik_Query("ALTER TABLE `". $table . "`
+ CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci ");
+}
+// force regeneration of cache files as we add 'hosts' entry in it
Piwik::setUserIsSuperUser();
$allSiteIds = Piwik_SitesManager_API::getAllSitesId();
Piwik_Common::regenerateCacheWebsiteAttributes($allSiteIds);
+