From 855ee3a8e36cc05d43eae1df4c1371d755df2f7b Mon Sep 17 00:00:00 2001 From: zYne Date: Sat, 10 Feb 2007 14:41:11 +0000 Subject: [PATCH] --- lib/Doctrine/Export/Mysql.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Doctrine/Export/Mysql.php b/lib/Doctrine/Export/Mysql.php index 862db48a3..e47753f53 100644 --- a/lib/Doctrine/Export/Mysql.php +++ b/lib/Doctrine/Export/Mysql.php @@ -384,19 +384,19 @@ class Doctrine_Export_Mysql extends Doctrine_Export * @throws PDOException * @return void */ - public function createIndex($table, $name, array $definition, $type = null) + public function createIndexSql($table, $name, array $definition) { $table = $table; $name = $this->conn->getIndexName($name); - - if(isset($type)) { - switch (strtolower($type)) { + $type = ''; + if(isset($definition['type'])) { + switch (strtolower($definition['type'])) { case 'fulltext': case 'unique': - $type = strtoupper($type) . ' '; + $type = strtoupper($definition['type']) . ' '; break; default: - throw new Doctrine_Export_Exception('Unknown index type ' . $type); + throw new Doctrine_Export_Exception('Unknown index type ' . $definition['type']); } } $query = 'CREATE ' . $type . 'INDEX ' . $name . ' ON ' . $table; @@ -412,7 +412,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export } $query .= ' ('. implode(', ', $fields) . ')'; - return $this->conn->exec($query); + return $query; } /** * drop existing index