More postgres tests passing again

This commit is contained in:
Jose Lorenzo Rodriguez 2011-09-03 18:34:11 -04:30
parent 93d6cd4ad6
commit 74ba030e7c
2 changed files with 4 additions and 3 deletions

View file

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

View file

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