Commit 0c857398 authored by zYne's avatar zYne

--no commit message

--no commit message
parent f69ba1bf
...@@ -144,12 +144,13 @@ class Doctrine_Export extends Doctrine_Connection_Module ...@@ -144,12 +144,13 @@ class Doctrine_Export extends Doctrine_Connection_Module
} }
$queryFields = $this->getFieldDeclarationList($fields); $queryFields = $this->getFieldDeclarationList($fields);
/**
if (isset($options['foreignKeys']) && ! empty($options['foreignKeys'])) { if (isset($options['foreignKeys']) && ! empty($options['foreignKeys'])) {
foreach($options['foreignKeys'] as $definition) { foreach($options['foreignKeys'] as $definition) {
$queryFields .= ', ' . $this->getForeignKeyDeclaration($definition); $queryFields .= ', ' . $this->getForeignKeyDeclaration($definition);
} }
} }
*/
if (isset($options['primary']) && ! empty($options['primary'])) { if (isset($options['primary']) && ! empty($options['primary'])) {
$queryFields .= ', PRIMARY KEY(' . implode(', ', array_values($options['primary'])) . ')'; $queryFields .= ', PRIMARY KEY(' . implode(', ', array_values($options['primary'])) . ')';
...@@ -230,7 +231,7 @@ class Doctrine_Export extends Doctrine_Connection_Module ...@@ -230,7 +231,7 @@ class Doctrine_Export extends Doctrine_Connection_Module
$name = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name)); $name = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name));
$query = 'ALTER TABLE ' . $table . ' ADD CONSTRAINT ' . $name; $query = 'ALTER TABLE ' . $table . ' ADD CONSTRAINT ' . $name;
if (isset($definition['primary']) && $definition['unique']) { if (isset($definition['primary']) && $definition['primary']) {
$query .= ' PRIMARY KEY'; $query .= ' PRIMARY KEY';
} elseif (isset($definition['unique']) && $definition['unique']) { } elseif (isset($definition['unique']) && $definition['unique']) {
$query .= ' UNIQUE'; $query .= ' UNIQUE';
...@@ -700,7 +701,7 @@ class Doctrine_Export extends Doctrine_Connection_Module ...@@ -700,7 +701,7 @@ class Doctrine_Export extends Doctrine_Connection_Module
$sql .= $keyword . $upper; $sql .= $keyword . $upper;
break; break;
default: default:
throw new Doctrine_Export_Exception('Unknown foreign key referential action option given.'); throw new Doctrine_Export_Exception('Unknown foreign key referential action \'' . $upper . '\' given.');
} }
} }
} }
......
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