mirror of
https://github.com/friendica/friendica
synced 2024-11-19 12:23:40 +00:00
Some SQL servers report different lengths for unsigned types
This commit is contained in:
parent
7af564442a
commit
5d03eb3dae
1 changed files with 2 additions and 2 deletions
|
@ -129,8 +129,8 @@ class DBStructure {
|
||||||
if (DBM::is_result($structures)) {
|
if (DBM::is_result($structures)) {
|
||||||
foreach ($structures AS $field) {
|
foreach ($structures AS $field) {
|
||||||
// Replace the default size values so that we don't have to define them
|
// Replace the default size values so that we don't have to define them
|
||||||
$search = ['tinyint(1)', 'tinyint(4)', 'smallint(6)', 'mediumint(9)', 'bigint(20)', 'int(11)'];
|
$search = ['tinyint(1)', 'tinyint(4)', 'smallint(5) unsigned', 'smallint(6)', 'mediumint(9)', 'bigint(20)', 'int(11)'];
|
||||||
$replace = ['boolean', 'tinyint', 'smallint', 'mediumint', 'bigint', 'int'];
|
$replace = ['boolean', 'tinyint', 'smallint unsigned', 'smallint', 'mediumint', 'bigint', 'int'];
|
||||||
$field["Type"] = str_replace($search, $replace, $field["Type"]);
|
$field["Type"] = str_replace($search, $replace, $field["Type"]);
|
||||||
|
|
||||||
$fielddata[$field["Field"]]["type"] = $field["Type"];
|
$fielddata[$field["Field"]]["type"] = $field["Type"];
|
||||||
|
|
Loading…
Reference in a new issue