From 5d03eb3daef2333d441901b5d976dd9d251d2d8d Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 15 Jan 2018 07:42:05 +0000 Subject: [PATCH] Some SQL servers report different lengths for unsigned types --- src/Database/DBStructure.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 1603ee5530..9e0f3eeacd 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -129,8 +129,8 @@ class DBStructure { if (DBM::is_result($structures)) { foreach ($structures AS $field) { // 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)']; - $replace = ['boolean', 'tinyint', 'smallint', 'mediumint', 'bigint', 'int']; + $search = ['tinyint(1)', 'tinyint(4)', 'smallint(5) unsigned', 'smallint(6)', 'mediumint(9)', 'bigint(20)', 'int(11)']; + $replace = ['boolean', 'tinyint', 'smallint unsigned', 'smallint', 'mediumint', 'bigint', 'int']; $field["Type"] = str_replace($search, $replace, $field["Type"]); $fielddata[$field["Field"]]["type"] = $field["Type"]; -- 2.39.5