From b7652f1f4ecdd0835929a6138c4daad8c136bf9b Mon Sep 17 00:00:00 2001 From: beberlei Date: Mon, 30 Nov 2009 22:33:08 +0000 Subject: [PATCH] [2.0] Temporary fix for 186 --- lib/Doctrine/DBAL/Schema/Table.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Schema/Table.php b/lib/Doctrine/DBAL/Schema/Table.php index eb54b07db..fd2a8219b 100644 --- a/lib/Doctrine/DBAL/Schema/Table.php +++ b/lib/Doctrine/DBAL/Schema/Table.php @@ -179,7 +179,11 @@ class Table extends AbstractAsset throw SchemaException::indexNameInvalid($indexName); } - foreach ($columnNames AS $columnName) { + foreach ($columnNames AS $columnName => $indexColOptions) { + if (is_numeric($columnName) && is_string($indexColOptions)) { + $columnName = $indexColOptions; + } + if (!isset($this->_columns[$columnName])) { throw SchemaException::columnDoesNotExist($columnName); }