Piwik\Updater::executeMigrations PHP Method

executeMigrations() public method

Execute multiple migration queries from a single Update file.
public executeMigrations ( string $file, Migration[] $migrations )
$file string The path to the Updates file.
$migrations Piwik\Updater\Migration[] An array of migrations
    public function executeMigrations($file, $migrations)
    {
        foreach ($migrations as $index => $migration) {
            $migration = $this->keepBcForOldMigrationQueryFormat($index, $migration);
            $this->executeMigration($file, $migration);
        }
    }

Usage Example

Example #1
0
 public function doUpdate(Updater $updater)
 {
     try {
         $updater->executeMigrations(__FILE__, $this->getMigrations($updater));
     } catch (\Exception $e) {
     }
 }
All Usage Examples Of Piwik\Updater::executeMigrations