mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
DependencyNode: Cast boolenum to int where applicable
PostgreSQL doesn't like mixing different types with COALESCE()
This commit is contained in:
parent
1eb1e72b6d
commit
8d39fa30d9
1 changed files with 2 additions and 2 deletions
|
|
@ -56,11 +56,11 @@ class DependencyNode extends Model
|
|||
['service.display_name', 'host.display_name', 'redundancy_group.display_name']
|
||||
),
|
||||
'severity' => new Expression(
|
||||
'COALESCE(%s, %s, %s)',
|
||||
"COALESCE(%s, %s, CASE WHEN %s = 'y' THEN 1 ELSE 0 END)",
|
||||
['service.state.severity', 'host.state.severity', 'redundancy_group.state.failed']
|
||||
),
|
||||
'state' => new Expression(
|
||||
'COALESCE(%s, %s, %s)',
|
||||
"COALESCE(%s, %s, CASE WHEN %s = 'y' THEN 1 ELSE 0 END)",
|
||||
['service.state.soft_state', 'host.state.soft_state', 'redundancy_group.state.failed']
|
||||
),
|
||||
'last_state_change' => new Expression(
|
||||
|
|
|
|||
Loading…
Reference in a new issue