mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -1284,9 +1284,9 @@ class DoliDBPgsql extends DoliDB
|
||||
|
||||
if (isset($field_desc['default']) && $field_desc['default'] != '') {
|
||||
if ($field_desc['type'] == 'double' || $field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') {
|
||||
$sql .= " DEFAULT ".$this->escape($field_desc['default']);
|
||||
} elseif ($field_desc['type'] != 'text') {
|
||||
$sql .= " DEFAULT '".$this->escape($field_desc['default'])."'"; // Default not supported on text fields
|
||||
$sql .= ", ALTER COLUMN ".$this->escape($field_name)." SET DEFAULT ".((float) $field_desc['default']);
|
||||
} elseif ($field_desc['type'] != 'text') { // Default not supported on text fields ?
|
||||
$sql .= ", ALTER COLUMN ".$this->escape($field_name)." SET DEFAULT '".$this->escape($field_desc['default'])."'";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user