diff options
Diffstat (limited to 'core/Updates/0.4.2.php')
-rw-r--r-- | core/Updates/0.4.2.php | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/core/Updates/0.4.2.php b/core/Updates/0.4.2.php index 9be470e46a..ef91786033 100644 --- a/core/Updates/0.4.2.php +++ b/core/Updates/0.4.2.php @@ -13,24 +13,19 @@ /** * @package Updates */ -class Piwik_Updates_0_4_2 extends Piwik_Updates +class Piwik_Updates_0_4_2 implements Piwik_iUpdate { - static function getSql($adapter = 'PDO_MYSQL') + // when restoring (possibly) previousy dropped columns, ignore mysql code error 1060: duplicate column + static function update() { - return array( - 'ALTER TABLE `'. Piwik_Common::prefixTable('log_visit') .'` + Piwik_Updater::updateDatabase(__FILE__, array( + 'ALTER TABLE `'. Piwik::prefixTable('log_visit') .'` ADD `config_java` TINYINT(1) NOT NULL AFTER `config_flash`' => '1060', - 'ALTER TABLE `'. Piwik_Common::prefixTable('log_visit') .'` + 'ALTER TABLE `'. Piwik::prefixTable('log_visit') .'` ADD `config_quicktime` TINYINT(1) NOT NULL AFTER `config_director`' => '1060', - 'ALTER TABLE `'. Piwik_Common::prefixTable('log_visit') .'` + 'ALTER TABLE `'. Piwik::prefixTable('log_visit') .'` ADD `config_gears` TINYINT(1) NOT NULL AFTER `config_windowsmedia`, ADD `config_silverlight` TINYINT(1) NOT NULL AFTER `config_gears`' => false, - ); - } - - // when restoring (possibly) previousy dropped columns, ignore mysql code error 1060: duplicate column - static function update() - { - Piwik_Updater::updateDatabase(__FILE__, self::getSql()); + )); } } |