From 46eda802e5d61c33357911521403027016f19fe1 Mon Sep 17 00:00:00 2001
From: mark_story <mark@mark-story.com>
Date: Thu, 16 Jan 2014 17:19:22 -0500
Subject: [PATCH] Fix mising connection parameter to schema objects.

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

Fixes #2668
---
 lib/Cake/Console/Command/SchemaShell.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php
index ff52a2d4b..a1f9dbf24 100644
--- a/lib/Cake/Console/Command/SchemaShell.php
+++ b/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';