diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index f7adcd5e9f0..ff52a2d4b4f 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -67,12 +67,12 @@ public function startup() { $name = $this->params['name'] = $splitName; } - if ($name && empty($this->params['file'])) { - $this->params['file'] = Inflector::underscore($name); - } - + $defaultFile = 'schema.php'; if (empty($this->params['file'])) { - $this->params['file'] = 'schema.php'; + $this->params['file'] = $defaultFile; + } + if ($name && $this->params['file'] === $defaultFile) { + $this->params['file'] = Inflector::underscore($name); } if (strpos($this->params['file'], '.php') === false) { $this->params['file'] .= '.php';