. */ /** * Doctrine_Task_Migrate * * @package Doctrine * @subpackage Task * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision: 2761 $ * @author Jonathan H. Wage */ class Doctrine_Task_Migrate extends Doctrine_Task { public $description = 'Migrate database to latest version or the specified version', $requiredArguments = array('migrations_path' => 'Specify path to your migrations directory.'), $optionalArguments = array('version' => 'Version to migrate to. If you do not specify, the db will be migrated from the current version to the latest.'); public function execute() { $version = Doctrine::migrate($this->getArgument('migrations_path'), $this->getArgument('version')); $this->dispatcher->notify('migrated to version # ' . $version); } }