|
|
@@ -106,11 +106,11 @@ class SchemaShell extends AppShell {
|
|
|
$File = new File($this->Schema->path . DS . $this->params['file']);
|
|
|
if ($File->exists()) {
|
|
|
$this->out($File->read());
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
} else {
|
|
|
$file = $this->Schema->path . DS . $this->params['file'];
|
|
|
$this->err(__d('cake_console', 'Schema file (%s) could not be found.', $file));
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -184,10 +184,10 @@ class SchemaShell extends AppShell {
|
|
|
|
|
|
if ($this->Schema->write($content)) {
|
|
|
$this->out(__d('cake_console', 'Schema file: %s generated', $content['file']));
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
} else {
|
|
|
$this->err(__d('cake_console', 'Schema file: %s generated'));
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -205,7 +205,7 @@ class SchemaShell extends AppShell {
|
|
|
$Schema = $this->Schema->load();
|
|
|
if (!$Schema) {
|
|
|
$this->err(__d('cake_console', 'Schema could not be loaded'));
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
}
|
|
|
if (!empty($this->params['write'])) {
|
|
|
if ($this->params['write'] == 1) {
|
|
|
@@ -229,10 +229,10 @@ class SchemaShell extends AppShell {
|
|
|
|
|
|
if ($File->write($contents)) {
|
|
|
$this->out(__d('cake_console', 'SQL dump file created in %s', $File->pwd()));
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
} else {
|
|
|
$this->err(__d('cake_console', 'SQL dump could not be created'));
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
}
|
|
|
}
|
|
|
$this->out($contents);
|
|
|
@@ -290,7 +290,7 @@ class SchemaShell extends AppShell {
|
|
|
$this->err(__d('cake_console', 'The chosen schema could not be loaded. Attempted to load:'));
|
|
|
$this->err(__d('cake_console', 'File: %s', $this->Schema->path . DS . $this->Schema->file));
|
|
|
$this->err(__d('cake_console', 'Name: %s', $this->Schema->name));
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
}
|
|
|
$table = null;
|
|
|
if (isset($this->args[1])) {
|
|
|
@@ -323,7 +323,7 @@ class SchemaShell extends AppShell {
|
|
|
}
|
|
|
if (empty($drop) || empty($create)) {
|
|
|
$this->out(__d('cake_console', 'Schema is up to date.'));
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
}
|
|
|
|
|
|
$this->out("\n" . __d('cake_console', 'The following table(s) will be dropped.'));
|
|
|
@@ -375,7 +375,7 @@ class SchemaShell extends AppShell {
|
|
|
|
|
|
if (empty($contents)) {
|
|
|
$this->out(__d('cake_console', 'Schema is up to date.'));
|
|
|
- $this->_stop();
|
|
|
+ return $this->_stop();
|
|
|
}
|
|
|
|
|
|
$this->out("\n" . __d('cake_console', 'The following statements will run.'));
|