PluginProbe
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / 5.0.6
Matomo Analytics – Powerful, Privacy-First Insights for WordPress v5.0.6
5.13.0 5.12.1 5.12.0 5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 All 83 releases
matomo / app / core / Updates / 4.7.0-b2.php
4.7.0-b2.php
49 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Matomo - free/libre analytics platform
5 *
6 * @link https://matomo.org
7 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
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 * Update for version 4.7.0-b2
18 */
19 class Updates_4_7_0_b2 extends PiwikUpdates
20 {
21 /**
22 * @var MigrationFactory
23 */
24 private $migration;
25 public function __construct(MigrationFactory $factory)
26 {
27 $this->migration = $factory;
28 }
29 /**
30 * Here you can define one or multiple SQL statements that should be executed during the update.
31 *
32 * @param Updater $updater
33 *
34 * @return Migration[]
35 */
36 public function getMigrations(Updater $updater)
37 {
38 $migrations = [];
39 // add column to track the last change a user viewed the changes list
40 $migrations[] = $this->migration->db->addColumn('user', 'idchange_last_viewed', 'INTEGER UNSIGNED NULL');
41 $migrations[] = $this->migration->db->createTable('changes', array('idchange' => 'INT(11) NOT NULL AUTO_INCREMENT', 'created_time' => 'DATETIME NOT NULL', 'plugin_name' => 'VARCHAR(255) NOT NULL', 'version' => 'VARCHAR(20) NOT NULL', 'title' => 'VARCHAR(255) NOT NULL', 'description' => 'TEXT NOT NULL', 'link_name' => 'VARCHAR(255) NULL', 'link' => 'VARCHAR(255) NULL'), $primaryKey = 'idchange');
42 return $migrations;
43 }
44 public function doUpdate(Updater $updater)
45 {
46 $updater->executeMigrations(__FILE__, $this->getMigrations($updater));
47 }
48 }
49