Changeset 19757
- Timestamp:
- 06/30/09 23:03:05 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfPropelMigrationsLightPlugin/trunk/lib/task/sfPropelMigrateTask.class.php
r10345 r19757 4 4 * This file is part of the sfPropelMigrationsLightPlugin package. 5 5 * (c) 2006-2008 Martin Kreidenweis <sf@kreidenweis.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 11 11 /** 12 12 * A symfony 1.1 port for the pake migrate task. 13 * 13 * 14 14 * @package sfPropelMigrationsLightPlugin 15 15 * @subpackage task … … 23 23 $this->addArguments(array( 24 24 new sfCommandArgument('application', sfCommandArgument::REQUIRED, 'The application name'), 25 new sfCommandArgument('schema-version', sfCommandArgument::OPTIONAL, 'The target schema version'), 25 26 )); 26 27 27 28 $this->addOptions(array( 28 29 new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'), 29 new sfCommandOption('schema-version', 'v', sfCommandOption::PARAMETER_REQUIRED, 'The target schema version'),30 30 )); 31 31 … … 47 47 $migrator = new sfMigrator; 48 48 49 if (isset($ options['schema-version']) && ctype_digit($options['schema-version']))49 if (isset($arguments['schema-version']) && ctype_digit($arguments['schema-version'])) 50 50 { 51 $runMigrationsCount = $migrator->migrate((int) $ options['schema-version']);51 $runMigrationsCount = $migrator->migrate((int) $arguments['schema-version']); 52 52 } 53 53 else