Skip to content

Commit

Permalink
Fix mising connection parameter to schema objects.
Browse files Browse the repository at this point in the history
When calling create/update the created schema object should be passed
the current connection.

Fixes #2668
  • Loading branch information
markstory committed Jan 16, 2014
1 parent f25e84f commit 46eda80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Cake/Console/Command/SchemaShell.php
Expand Up @@ -282,7 +282,11 @@ protected function _loadSchema() {
$this->out(__d('cake_console', 'Performing a dry run.'));
}

$options = array('name' => $name, 'plugin' => $plugin);
$options = array(
'name' => $name,
'plugin' => $plugin,
'connection' => $this->params['connection'],
);
if (!empty($this->params['snapshot'])) {
$fileName = rtrim($this->Schema->file, '.php');
$options['file'] = $fileName . '_' . $this->params['snapshot'] . '.php';
Expand Down

0 comments on commit 46eda80

Please sign in to comment.