diff options
Diffstat (limited to 'core/Updates/0.2.33.php')
-rw-r--r-- | core/Updates/0.2.33.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/core/Updates/0.2.33.php b/core/Updates/0.2.33.php index ce936f5731..ed94e78fb8 100644 --- a/core/Updates/0.2.33.php +++ b/core/Updates/0.2.33.php @@ -13,10 +13,18 @@ /** * @package Updates */ -class Piwik_Updates_0_2_33 implements Piwik_iUpdate +class Piwik_Updates_0_2_33 extends Piwik_Updates { - static function update() + static function getSql($adapter = 'PDO_MYSQL') { + $sqlarray = array( + // 0.2.33 [1020] + 'ALTER TABLE `'. Piwik_Common::prefixTable('user_dashboard') .'` + CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci ' => '1146', + 'ALTER TABLE `'. Piwik_Common::prefixTable('user_language') .'` + CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci ' => '1146', + ); + // alter table to set the utf8 collation $tablesToAlter = Piwik::getTablesInstalled(true); foreach($tablesToAlter as $table) { @@ -24,6 +32,11 @@ class Piwik_Updates_0_2_33 implements Piwik_iUpdate CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci ' ] = false; } - Piwik_Updater::updateDatabase(__FILE__, $sqlarray); + return $sqlarray; + } + + static function update() + { + Piwik_Updater::updateDatabase(__FILE__, self::getSql()); } } |