public function migrate($packageKey, $versionNumber = null, $force = false)
    {
        $packagesData = $this->getPackagesData($packageKey);
        foreach ($this->getMigrations($versionNumber) as $migration) {
            $this->triggerEvent(self::EVENT_MIGRATION_START, array($migration));
            foreach ($packagesData as &$this->currentPackageData) {
                $this->migratePackage($migration, $force);
            }
            $this->triggerEvent(self::EVENT_MIGRATION_DONE, array($migration));
        }
    }
public function migrate($packageKey, $versionNumber = null, $force = false)
    {
        $packagesData = $this->getPackagesData($packageKey);
        foreach ($this->getMigrations($versionNumber) as $migration) {
            $this->triggerEvent(self::EVENT_MIGRATION_START, array($migration));
            foreach ($packagesData as &$this->currentPackageData) {
                $this->migratePackage($migration, $force);
            }
            $this->triggerEvent(self::EVENT_MIGRATION_DONE, array($migration));
        }
    }
public function migrate ( $ packageKey , $ versionNumber = null , $ force = false ) { $ packagesData = $ this -> getPackagesData ( $ packageKey ) ; foreach ( $ this -> getMigrations ( $ versionNumber ) as $ migration ) { $ this -> triggerEvent ( self :: EVENT_MIGRATION_START , array ( $ migration ) ) ; foreach ( $ packagesData as & $ this -> currentPackageData ) { $ this -> migratePackage ( $ migration , $ force ) ; } $ this -> triggerEvent ( self :: EVENT_MIGRATION_DONE , array ( $ migration ) ) ; } }
This iterates over available migrations and applies them to
the existing packages if
- the package needs the migration
- is a clean git working copy

@param string $packageKey key of the package to migrate
@param string $versionNumber version of the migration to execute (e.g. "20120126163610"), or NULL to execute all migrations
@param boolean $force if true migrations will be applied even if the corresponding package is not a git working copy or contains local changes
@return void
This iterates over available migrations and applies them to the existing packages if - the package needs the migration - is a clean git working copy