From 72cba8865065f5f11c9487615c161cecb16e7db6 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 11 Oct 2010 19:28:02 -0700 Subject: fix for column prefixes in table/index building --- lib/schema.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/schema.php b/lib/schema.php index acc941284..f6543a21b 100644 --- a/lib/schema.php +++ b/lib/schema.php @@ -254,7 +254,16 @@ class Schema function buildIndexList(array $def) { // @fixme - return '(' . implode(',', array_map(array($this, 'quoteIdentifier'), $def)) . ')'; + return '(' . implode(',', array_map(array($this, 'buildIndexItem'), $def)) . ')'; + } + + function buildIndexItem($def) + { + if (is_array($def)) { + list($name, $size) = $def; + return $this->quoteIdentifier($name) . '(' . intval($size) . ')'; + } + return $this->quoteIdentifier($def); } /** -- cgit v1.2.3-54-g00ecf