Merge pull request #23068 from noec764/14_0_FIX_PGSQL_UpdatField

FIX: PGSQL Integer type does not have a free lenght
This commit is contained in:
Laurent Destailleur 2022-12-01 17:13:26 +01:00 committed by GitHub
commit 931fe92148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1182,7 +1182,7 @@ class DoliDBPgsql extends DoliDB
// phpcs:enable
$sql = "ALTER TABLE ".$table;
$sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type'];
if (in_array($field_desc['type'], array('double', 'tinyint', 'int', 'varchar')) && $field_desc['value']) {
if (in_array($field_desc['type'], array('double', 'varchar')) && $field_desc['value']) {
$sql .= "(".$field_desc['value'].")";
}