summaryrefslogtreecommitdiff
path: root/lib/schema.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/schema.php')
-rw-r--r--lib/schema.php11
1 files changed, 10 insertions, 1 deletions
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);
}
/**