Merge branch 'ATM-Consulting-FIX_Entity_on_workstation' into develop
This commit is contained in:
commit
d423b53614
2 changed files with 20 additions and 11 deletions
|
|
@ -1019,8 +1019,7 @@ class DoliDBPgsql extends DoliDB
|
|||
* List information of columns into a table.
|
||||
*
|
||||
* @param string $table Name of table
|
||||
* @return array Tableau des information des champs de la table
|
||||
*
|
||||
* @return array Array with information on table
|
||||
*/
|
||||
public function DDLInfoTable($table)
|
||||
{
|
||||
|
|
@ -1028,22 +1027,21 @@ class DoliDBPgsql extends DoliDB
|
|||
$infotables = array();
|
||||
|
||||
$sql = "SELECT ";
|
||||
$sql .= " infcol.column_name as \"Column\",";
|
||||
$sql .= " infcol.column_name as 'Column',";
|
||||
$sql .= " CASE WHEN infcol.character_maximum_length IS NOT NULL THEN infcol.udt_name || '('||infcol.character_maximum_length||')'";
|
||||
$sql .= " ELSE infcol.udt_name";
|
||||
$sql .= " END as \"Type\",";
|
||||
$sql .= " infcol.collation_name as \"Collation\",";
|
||||
$sql .= " infcol.is_nullable as \"Null\",";
|
||||
$sql .= " '' as \"Key\",";
|
||||
$sql .= " infcol.column_default as \"Default\",";
|
||||
$sql .= " '' as \"Extra\",";
|
||||
$sql .= " '' as \"Privileges\"";
|
||||
$sql .= " END as 'Type',";
|
||||
$sql .= " infcol.collation_name as 'Collation',";
|
||||
$sql .= " infcol.is_nullable as 'Null',";
|
||||
$sql .= " '' as 'Key',";
|
||||
$sql .= " infcol.column_default as 'Default',";
|
||||
$sql .= " '' as 'Extra',";
|
||||
$sql .= " '' as 'Privileges'";
|
||||
$sql .= " FROM information_schema.columns infcol";
|
||||
$sql .= " WHERE table_schema = 'public' ";
|
||||
$sql .= " AND table_name = '".$this->escape($table)."'";
|
||||
$sql .= " ORDER BY ordinal_position;";
|
||||
|
||||
dol_syslog($sql, LOG_DEBUG);
|
||||
$result = $this->query($sql);
|
||||
if ($result) {
|
||||
while ($row = $this->fetch_row($result)) {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,17 @@ class Workstation extends CommonObject
|
|||
*/
|
||||
public $table_element = 'workstation_workstation';
|
||||
|
||||
/**
|
||||
* @var int Does this object support multicompany module ?
|
||||
* 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||
*/
|
||||
public $isextrafieldmanaged = 0;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for workstation. Must be the part after the 'object_' into object_workstation.png
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue