ソースを参照

More postgres tests passing again

Jose Lorenzo Rodriguez 14 年 前
コミット
74ba030e7c

+ 4 - 2
lib/Cake/Console/Command/SchemaShell.php

@@ -419,8 +419,10 @@ class SchemaShell extends Shell {
 						return false;
 					}
 					$error = null;
-					if (!$db->execute($sql)) {
-						$error = $table . ': '  . $db->lastError();
+					try {
+						$db->execute($sql);
+					} catch (PDOException $e) {
+						$error = $table . ': '  . $e->getMessage();
 					}
 
 					$Schema->after(array($event => $table, 'errors' => $error));

+ 0 - 1
lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php

@@ -678,7 +678,6 @@ class DboPostgresTest extends CakeTestCase {
 		));
 
 		$this->Dbo->rawQuery($this->Dbo->createSchema($schema1));
-		$this->Dbo->rawQuery($this->Dbo->dropSchema($schema1));
 
 		$schema2 = new CakeSchema(array(
 			'name' => 'AlterTest2',