Leon4gr45's picture
Upload source files chunk 26
b21a4d3 verified
Raw
History Blame Contribute Delete
983 Bytes
<?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\Plugins\CustomAlerts;
use Piwik\Updater;
use Piwik\Updater\Migration\Factory as MigrationFactory;
use Piwik\Updates;
/**
*/
class Updates_0_1_17 extends Updates
{
/**
* @var MigrationFactory
*/
private $migration;
public function __construct(MigrationFactory $factory)
{
$this->migration = $factory;
}
public function doUpdate(Updater $updater)
{
$updater->executeMigrations(__FILE__, $this->getMigrations($updater));
}
public function getMigrations(Updater $updater)
{
return array(
$this->migration->db->changeColumnType('alert', 'email_me', "BOOLEAN NOT NULL DEFAULT '0'"),
$this->migration->db->changeColumnType('alert_triggered', 'email_me', "BOOLEAN NOT NULL DEFAULT '0'"),
);
}
}