From 745b52b163adcfa82bb7f586ba499c94807c71ef Mon Sep 17 00:00:00 2001 From: beberlei Date: Wed, 2 Dec 2009 22:33:01 +0000 Subject: [PATCH] [2.0] DDC-169 - Fixed introduced bug in Oracle Platform --- lib/Doctrine/DBAL/Platforms/AbstractPlatform.php | 4 ++-- lib/Doctrine/DBAL/Platforms/OraclePlatform.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index 66c9865c4..c260249a3 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -496,11 +496,11 @@ abstract class AbstractPlatform */ public function getDropConstraintSql($constraint, $table) { - if ($constraint->getName()) { + if ($constraint instanceof \Doctrine\DBAL\Schema\Constraint) { $constraint = $constraint->getName(); } - if ($table->getName()) { + if ($table instanceof \Doctrine\DBAL\Schema\Table) { $table = $table->getName(); } diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index 96801b6e6..a590b36d8 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -406,7 +406,7 @@ END;'; $sql[] = $this->getDropSequenceSql($table.'_SEQ'); $indexName = $table . '_AI_PK'; - $sql[] = $this->getDropConstraintSql($table, $indexName); + $sql[] = $this->getDropConstraintSql($indexName, $table); } return $sql;