diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2016-04-19 00:06:33 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2016-04-19 00:06:33 +0300 |
commit | 24d8a0ee74fd6d6f26338c3efb8eb143eaed5ec0 (patch) | |
tree | e303601210c2b9d1e8b776007b8808d41f04adc7 /plugins/Provider/Updates | |
parent | 252148a742fa0681066d16a2aba30d429ef45e25 (diff) |
fix DB field piwik_log_visit.location_provider too small (#10003)
* fixes #9564 fix DB field piwik_log_visit.location_provider too small
* use new plugins updater API
Diffstat (limited to 'plugins/Provider/Updates')
-rw-r--r-- | plugins/Provider/Updates/3.0.0-b1.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/Provider/Updates/3.0.0-b1.php b/plugins/Provider/Updates/3.0.0-b1.php new file mode 100644 index 0000000000..27cae67555 --- /dev/null +++ b/plugins/Provider/Updates/3.0.0-b1.php @@ -0,0 +1,43 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ + +namespace Piwik\Plugins\Provider\Updates; + +use Piwik\Updater; +use Piwik\Updates as PiwikUpdates; +use Piwik\Updater\Migration; +use Piwik\Updater\Migration\Factory as MigrationFactory; + +/** + * Update for version 3.0.0-b1. + */ +class Updates_3_0_0_b1 extends PiwikUpdates +{ + /** + * @var MigrationFactory + */ + private $migration; + + public function __construct(MigrationFactory $factory) + { + $this->migration = $factory; + } + + public function getMigrations(Updater $updater) + { + return array( + $this->migration->db->changeColumnType('log_visit', 'location_provider', 'VARCHAR(200) NULL') + ); + } + + public function doUpdate(Updater $updater) + { + $updater->executeMigrations(__FILE__, $this->getMigrations($updater)); + } +} |