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',
$name,
$this->column_type[$type],
$type,
$size ? "($size)" : '',
$column_charset,
isset($default) ? "DEFAULT '$default'" : '',
@ -828,8 +836,6 @@ class DBMySQL extends DB
}
}
// Process
// Process indexes
if(count($primary_list))
{