|
|
@@ -127,7 +127,9 @@ class SchemaShell extends AppShell {
|
|
|
$this->out(__d('cake_console', 'Generating Schema...'));
|
|
|
$options = array();
|
|
|
if ($this->params['force']) {
|
|
|
- $options = array('models' => false);
|
|
|
+ $options['models'] = false;
|
|
|
+ } elseif (!empty($this->params['models'])) {
|
|
|
+ $options['models'] = String::tokenize($this->params['models']);
|
|
|
}
|
|
|
|
|
|
$snapshot = false;
|
|
|
@@ -464,6 +466,10 @@ class SchemaShell extends AppShell {
|
|
|
'short' => 's',
|
|
|
'help' => __d('cake_console', 'Snapshot number to use/make.')
|
|
|
);
|
|
|
+ $models = array(
|
|
|
+ 'short' => 'm',
|
|
|
+ 'help' => __d('cake_console', 'Specify models as comma separated list.'),
|
|
|
+ );
|
|
|
$dry = array(
|
|
|
'help' => __d('cake_console', 'Perform a dry run on create and update commands. Queries will be output instead of run.'),
|
|
|
'boolean' => true
|
|
|
@@ -489,7 +495,7 @@ class SchemaShell extends AppShell {
|
|
|
))->addSubcommand('generate', array(
|
|
|
'help' => __d('cake_console', 'Reads from --connection and writes to --path. Generate snapshots with -s'),
|
|
|
'parser' => array(
|
|
|
- 'options' => compact('plugin', 'path', 'file', 'name', 'connection', 'snapshot', 'force'),
|
|
|
+ 'options' => compact('plugin', 'path', 'file', 'name', 'connection', 'snapshot', 'force', 'models'),
|
|
|
'arguments' => array(
|
|
|
'snapshot' => array('help' => __d('cake_console', 'Generate a snapshot.'))
|
|
|
)
|