fix for column prefixes in table/index building
This commit is contained in:
parent
2c9f877ab5
commit
72cba88650
@ -119,7 +119,7 @@ $schema['user'] = array(
|
|||||||
),
|
),
|
||||||
'primary key' => array('id'),
|
'primary key' => array('id'),
|
||||||
'unique keys' => array(
|
'unique keys' => array(
|
||||||
'user_name_idx' => array('name'),
|
'user_nickname_idx' => array('nickname'),
|
||||||
'user_email_idx' => array('email'),
|
'user_email_idx' => array('email'),
|
||||||
'user_incomingemail_idx' => array('incomingemail'),
|
'user_incomingemail_idx' => array('incomingemail'),
|
||||||
'user_sms_idx' => array('sms'),
|
'user_sms_idx' => array('sms'),
|
||||||
|
@ -254,7 +254,16 @@ class Schema
|
|||||||
function buildIndexList(array $def)
|
function buildIndexList(array $def)
|
||||||
{
|
{
|
||||||
// @fixme
|
// @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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user