Permalink
Browse files

Fix mising connection parameter to schema objects.

When calling create/update the created schema object should be passed
the current connection.

Fixes #2668
  • Loading branch information...
1 parent f25e84f commit 46eda802e5d61c33357911521403027016f19fe1 @markstory markstory committed Jan 16, 2014
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/Console/Command/SchemaShell.php
@@ -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';

0 comments on commit 46eda80

Please sign in to comment.