"Fossies" - the Fresh Open Source Software Archive

Member "matomo/plugins/DevicesDetection/Updates/1.14.php" (3 Aug 2022, 1051 Bytes) of package /linux/www/matomo-4.11.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 <?php
    2 /**
    3  * Matomo - 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\Plugins\DevicesDetection;
   11 
   12 use Piwik\Updater;
   13 use Piwik\Updates;
   14 use Piwik\Updater\Migration\Factory as MigrationFactory;
   15 
   16 class Updates_1_14 extends Updates
   17 {
   18     /**
   19      * @var MigrationFactory
   20      */
   21     private $migration;
   22 
   23     public function __construct(MigrationFactory $factory)
   24     {
   25         $this->migration = $factory;
   26     }
   27 
   28     public function getMigrations(Updater $updater)
   29     {
   30         return array(
   31             $this->migration->db->changeColumnTypes('log_visit', array(
   32                 'config_os_version' => 'VARCHAR( 100 ) DEFAULT NULL',
   33                 'config_device_type' => 'VARCHAR( 100 ) DEFAULT NULL'
   34             ))
   35         );
   36     }
   37 
   38     static function isMajorUpdate()
   39     {
   40         return true;
   41     }
   42 
   43     public function doUpdate(Updater $updater)
   44     {
   45         $updater->executeMigrations(__FILE__, $this->getMigrations($updater));
   46     }
   47 
   48 }