浏览代码

Fix mising connection parameter to schema objects.

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

Fixes #2668
mark_story 12 年之前
父节点
当前提交
46eda802e5
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      lib/Cake/Console/Command/SchemaShell.php

+ 5 - 1
lib/Cake/Console/Command/SchemaShell.php

@@ -282,7 +282,11 @@ class SchemaShell extends AppShell {
 			$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';