Commit b7652f1f authored by beberlei's avatar beberlei

[2.0] Temporary fix for 186

parent 31be2519
...@@ -179,7 +179,11 @@ class Table extends AbstractAsset ...@@ -179,7 +179,11 @@ class Table extends AbstractAsset
throw SchemaException::indexNameInvalid($indexName); 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])) { if (!isset($this->_columns[$columnName])) {
throw SchemaException::columnDoesNotExist($columnName); throw SchemaException::columnDoesNotExist($columnName);
} }
......
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