* Perform a migration chain by specifying the $from and $to.
* If you do not specify a $from or $to then it will attempt to migrate from the current version to the latest version
*
* @param string $from
* @param string $to
* @return void
*/
publicfunctionmigrate($from=null,$to=null)
{
// If nothing specified then lets assume we are migrating from the current version to the latest version
if($from===null&&$to===null){
$from=$this->getCurrentVersion();
$to=$this->getLatestVersion();
}
if($from===$to){
thrownewDoctrine_Migration_Exception('You specified an invalid migration path. The from and to cannot be the same. You specified from: '.$from.' and to: '.$to);