PHP Class Piwik\Plugins\ExamplePlugin\Updates\Updates_0_0_2

Inheritance: extends Piwik\Updates
Datei anzeigen Open project: piwik/piwik

Public Methods

Method Description
__construct ( Factory $factory )
doUpdate ( Updater $updater ) Perform the incremental version update.
getMigrations ( Updater $updater ) : Db[] Return database migrations to be executed in this update.

Method Details

__construct() public method

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

doUpdate() public method

This method should perform all updating logic. If you define queries in the getMigrations() method, you must call {@link Updater::executeMigrations()} here.
public doUpdate ( Updater $updater )
$updater Piwik\Updater

getMigrations() public method

Database migrations should be defined here, instead of in doUpdate(), since this method is used in the core:update command when displaying the queries an update will run. If you execute migrations directly in doUpdate(), they won't be displayed to the user. Migrations will be executed in the order as positioned in the returned array.
public getMigrations ( Updater $updater ) : Db[]
$updater Piwik\Updater
return Piwik\Updater\Migration\Db[]