Support data types not defined in XE

This commit is contained in:
Kijin Sung 2018-07-05 23:46:21 +09:00
parent 32c9de472a
commit 71bee10ae9

View file

@ -804,9 +804,17 @@ class DBMySQL extends DB
} }
} }
// Normalize data type
$type = strtolower($type);
$type = isset($this->column_type[$type]) ? $this->column_type[$type] : $type;
if(in_array($type, ['integer', 'int', 'bigint', 'smallint']))
{
$size = '';
}
$column_schema[$name] = sprintf('`%s` %s%s %s %s %s %s', $column_schema[$name] = sprintf('`%s` %s%s %s %s %s %s',
$name, $name,
$this->column_type[$type], $type,
$size ? "($size)" : '', $size ? "($size)" : '',
$column_charset, $column_charset,
isset($default) ? "DEFAULT '$default'" : '', isset($default) ? "DEFAULT '$default'" : '',
@ -828,8 +836,6 @@ class DBMySQL extends DB
} }
} }
// Process
// Process indexes // Process indexes
if(count($primary_list)) if(count($primary_list))
{ {