PHP Class Piwik\Updates\Updates_2_10_0_b5

In the future only DevicesDetection will handle browser and os archives, so we try to rename all existing archives of UserSettings plugin to their corresponding archive name in DevicesDetection plugin: - *UserSettings_browser* will now be *DevicesDetection_browserVersions* - *UserSettings_os* will now be *DevicesDetection_osVersions* Unlike DevicesDetection plugin, the UserSettings plugin did not store archives holding the os and browser data without their version number. The "version-less" reports were always generated out of the "version-containing" archives . For big archives (month/year) that ment that some of the data was truncated, due to the datatable entry limit. To avoid that data loss / inaccuracy in the future, DevicesDetection plugin will also store archives without the version. For data archived after DevicesDetection plugin was enabled, those archive already exist. As we are removing the UserSettings reports, there is a fallback in DevicesDetection API to build the report out of the datatable with versions. NOTE: Some archives might not contain "all" data. That might have happened directly after the day DevicesDetection plugin was enabled. For the days before, there were no archives calculated. So week/month/year archives will only contain data for the days, where archives were generated To find a date after which it is safe to use DevicesDetection archives we need to find the first day-archive that contains DevicesDetection data. Day archives will always contain full data, but week/month/year archives may not. So we need to recreate those week/month/year archives.
Inheritance: extends Piwik\Updates
Show file Open project: piwik/piwik Class Usage Examples

Public Properties

Property Type Description
$archiveBlobTables

Public Methods

Method Description
__construct ( Factory $factory )
doUpdate ( Updater $updater )
getAllArchiveBlobTables ( ) : array Returns all available archive blob tables
getFirstDayOfArchivedDeviceDetectorData ( ) : integer Find the first day on which DevicesDetection archives were generated
getMigrations ( Updater $updater )
updateBrowserArchives ( string $table ) Updates all browser archives to new structure
updateOsArchives ( $table )

Method Details

__construct() public method

public __construct ( Factory $factory )
$factory Piwik\Updater\Migration\Factory

doUpdate() public method

public doUpdate ( Updater $updater )
$updater Piwik\Updater

getAllArchiveBlobTables() public static method

Returns all available archive blob tables
public static getAllArchiveBlobTables ( ) : array
return array

getFirstDayOfArchivedDeviceDetectorData() public static method

Find the first day on which DevicesDetection archives were generated
public static getFirstDayOfArchivedDeviceDetectorData ( ) : integer
return integer Timestamp

getMigrations() public method

public getMigrations ( Updater $updater )
$updater Piwik\Updater

updateBrowserArchives() public static method

Updates all browser archives to new structure
public static updateBrowserArchives ( string $table )
$table string

updateOsArchives() public static method

public static updateOsArchives ( $table )

Property Details

$archiveBlobTables public static property

public static $archiveBlobTables