Commit 745b52b1 authored by beberlei's avatar beberlei

[2.0] DDC-169 - Fixed introduced bug in Oracle Platform

parent 197224de
...@@ -496,11 +496,11 @@ abstract class AbstractPlatform ...@@ -496,11 +496,11 @@ abstract class AbstractPlatform
*/ */
public function getDropConstraintSql($constraint, $table) public function getDropConstraintSql($constraint, $table)
{ {
if ($constraint->getName()) { if ($constraint instanceof \Doctrine\DBAL\Schema\Constraint) {
$constraint = $constraint->getName(); $constraint = $constraint->getName();
} }
if ($table->getName()) { if ($table instanceof \Doctrine\DBAL\Schema\Table) {
$table = $table->getName(); $table = $table->getName();
} }
......
...@@ -406,7 +406,7 @@ END;'; ...@@ -406,7 +406,7 @@ END;';
$sql[] = $this->getDropSequenceSql($table.'_SEQ'); $sql[] = $this->getDropSequenceSql($table.'_SEQ');
$indexName = $table . '_AI_PK'; $indexName = $table . '_AI_PK';
$sql[] = $this->getDropConstraintSql($table, $indexName); $sql[] = $this->getDropConstraintSql($indexName, $table);
} }
return $sql; return $sql;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment