diff options
author | sgiehl <stefan@matomo.org> | 2022-02-03 12:36:10 +0300 |
---|---|---|
committer | sgiehl <stefan@matomo.org> | 2022-02-03 12:36:10 +0300 |
commit | 7ac6ddeaf4eb60d94f850d3312af315aadc48e91 (patch) | |
tree | cf8f51a21b0fe472d49aa665e10c190759cec5cb /core | |
parent | 974511bb495e9b9b36585743dad39b17bb35d9bb (diff) | |
parent | 4f1edc24869edefd37b0a78f2bda81708834f7f6 (diff) |
Merge branch 'next_release' into 4.x-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/Db/Schema/Mysql.php | 4 | ||||
-rw-r--r-- | core/Updates/4.7.0-b2.php | 3 | ||||
-rw-r--r-- | core/Updates/4.7.1-b1.php | 57 | ||||
-rw-r--r-- | core/Version.php | 2 |
4 files changed, 60 insertions, 6 deletions
diff --git a/core/Db/Schema/Mysql.php b/core/Db/Schema/Mysql.php index 7421b02ee9..fcf943bbdd 100644 --- a/core/Db/Schema/Mysql.php +++ b/core/Db/Schema/Mysql.php @@ -362,14 +362,14 @@ class Mysql implements SchemaInterface 'changes' => "CREATE TABLE `{$prefixTables}changes` ( `idchange` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `created_time` DATETIME NOT NULL, - `plugin_name` VARCHAR(255) NOT NULL, + `plugin_name` VARCHAR(60) NOT NULL, `version` VARCHAR(20) NOT NULL, `title` VARCHAR(255) NOT NULL, `description` TEXT NULL, `link_name` VARCHAR(255) NULL, `link` VARCHAR(255) NULL, PRIMARY KEY(`idchange`), - UNIQUE KEY unique_plugin_version_title (`plugin_name`, `version`, `title`) + UNIQUE KEY unique_plugin_version_title (`plugin_name`, `version`, `title`(100)) ) ENGINE=$engine DEFAULT CHARSET=$charset ", ); diff --git a/core/Updates/4.7.0-b2.php b/core/Updates/4.7.0-b2.php index 3317067c8d..7d57ee147d 100644 --- a/core/Updates/4.7.0-b2.php +++ b/core/Updates/4.7.0-b2.php @@ -56,9 +56,6 @@ class Updates_4_7_0_b2 extends PiwikUpdates 'link' => 'VARCHAR(255) NULL', ), $primaryKey = 'idchange'); - - $migrations[] = $this->migration->db->addUniqueKey('changes', ['plugin_name', 'version', 'title'], 'unique_plugin_version_title'); - return $migrations; } diff --git a/core/Updates/4.7.1-b1.php b/core/Updates/4.7.1-b1.php new file mode 100644 index 0000000000..b543b812b0 --- /dev/null +++ b/core/Updates/4.7.1-b1.php @@ -0,0 +1,57 @@ +<?php + +/** + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ + +namespace Piwik\Updates; + +use Piwik\Updater; +use Piwik\Updates as PiwikUpdates; +use Piwik\Updater\Migration; +use Piwik\Updater\Migration\Factory as MigrationFactory; + +/** + * Update for version 4.7.1-b1 + */ +class Updates_4_7_1_b1 extends PiwikUpdates +{ + /** + * @var MigrationFactory + */ + private $migration; + + public function __construct(MigrationFactory $factory) + { + $this->migration = $factory; + } + + /** + * Here you can define one or multiple SQL statements that should be executed during the update. + * + * @param Updater $updater + * + * @return Migration[] + */ + public function getMigrations(Updater $updater) + { + $migrations = []; + + $migrations[] = $this->migration->db->changeColumn('changes', 'plugin_name', 'plugin_name', 'VARCHAR(60) NOT NULL'); + + $migrations[] = $this->migration->db->dropIndex('changes', 'unique_plugin_version_title'); + $migrations[] = $this->migration->db->addUniqueKey('changes', ['plugin_name', 'version', 'title(100)'], 'unique_plugin_version_title'); + + return $migrations; + } + + public function doUpdate(Updater $updater) + { + $updater->executeMigrations(__FILE__, $this->getMigrations($updater)); + } + +} diff --git a/core/Version.php b/core/Version.php index f8e973c6bd..a5a57de219 100644 --- a/core/Version.php +++ b/core/Version.php @@ -20,7 +20,7 @@ final class Version * The current Matomo version. * @var string */ - const VERSION = '4.7.0'; + const VERSION = '4.7.1'; const MAJOR_VERSION = 4; |