mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Support data types not defined in XE
This commit is contained in:
parent
32c9de472a
commit
71bee10ae9
1 changed files with 9 additions and 3 deletions
|
|
@ -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))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue