3.12.0-b1.php
6 years ago
3.12.0-b7.php
6 years ago
3.13.4-b1.php
6 years ago
3.13.5-rc1.php
6 years ago
3.13.6-b1.php
6 years ago
4.0.0-b1.php
6 years ago
4.0.0-b1.php
48 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Piwik - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | * |
| 8 | */ |
| 9 | |
| 10 | namespace Piwik\Updates; |
| 11 | |
| 12 | use Piwik\Updater; |
| 13 | use Piwik\Updates as PiwikUpdates; |
| 14 | use Piwik\Updater\Migration; |
| 15 | use Piwik\Updater\Migration\Factory as MigrationFactory; |
| 16 | |
| 17 | /** |
| 18 | * Update for version 4.0.0-b1. |
| 19 | */ |
| 20 | class Updates_4_0_0_b1 extends PiwikUpdates |
| 21 | { |
| 22 | /** |
| 23 | * @var MigrationFactory |
| 24 | */ |
| 25 | private $migration; |
| 26 | |
| 27 | public function __construct(MigrationFactory $factory) |
| 28 | { |
| 29 | $this->migration = $factory; |
| 30 | } |
| 31 | |
| 32 | public function getMigrations(Updater $updater) |
| 33 | { |
| 34 | $migration1 = $this->migration->db->changeColumnType('log_action', 'name', 'VARCHAR(4096)'); |
| 35 | $migration2 = $this->migration->db->changeColumnType('log_conversion', 'url', 'VARCHAR(4096)'); |
| 36 | |
| 37 | return array( |
| 38 | $migration1, |
| 39 | $migration2 |
| 40 | ); |
| 41 | } |
| 42 | |
| 43 | public function doUpdate(Updater $updater) |
| 44 | { |
| 45 | $updater->executeMigrations(__FILE__, $this->getMigrations($updater)); |
| 46 | } |
| 47 | } |
| 48 |