DowntimeQuery: Postgres fixes
Change is_fixed to boolean check and illegal postgres timerange of '0000-00-00 00:00:00'. refs #5896
This commit is contained in:
parent
751d2e6d11
commit
e46dd4bdfd
|
@ -23,8 +23,8 @@ class DowntimeQuery extends IdoQuery
|
|||
'downtime_triggered_by_id' => 'sd.triggered_by_id',
|
||||
'downtime_scheduled_start' => 'UNIX_TIMESTAMP(sd.scheduled_start_time)',
|
||||
'downtime_scheduled_end' => 'UNIX_TIMESTAMP(sd.scheduled_end_time)',
|
||||
'downtime_start' => "UNIX_TIMESTAMP(CASE WHEN sd.trigger_time != '0000-00-00 00:00:00' then sd.trigger_time ELSE sd.scheduled_start_time END)",
|
||||
'downtime_end' => 'CASE WHEN sd.is_fixed THEN UNIX_TIMESTAMP(sd.scheduled_end_time) ELSE UNIX_TIMESTAMP(sd.trigger_time) + sd.duration END',
|
||||
'downtime_start' => "UNIX_TIMESTAMP(CASE WHEN UNIX_TIMESTAMP(sd.trigger_time) > 0 then sd.trigger_time ELSE sd.scheduled_start_time END)",
|
||||
'downtime_end' => 'CASE WHEN sd.is_fixed > 0 THEN UNIX_TIMESTAMP(sd.scheduled_end_time) ELSE UNIX_TIMESTAMP(sd.trigger_time) + sd.duration END',
|
||||
'downtime_duration' => 'sd.duration',
|
||||
'downtime_is_in_effect' => 'sd.is_in_effect',
|
||||
'downtime_internal_id' => 'sd.internal_downtime_id',
|
||||
|
|
Loading…
Reference in New Issue