mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Merge pull request #623 from Icinga/was_started-621
cmd/icingadb-migrate: ignore icinga_downtimehistory#was_started=0 rows
This commit is contained in:
commit
b05128ec00
2 changed files with 3 additions and 2 deletions
|
|
@ -224,6 +224,7 @@ type downtimeRow = struct {
|
|||
Duration int64
|
||||
ScheduledStartTime sql.NullInt64
|
||||
ScheduledEndTime int64
|
||||
WasStarted uint8
|
||||
ActualStartTime int64
|
||||
ActualStartTimeUsec uint32
|
||||
ActualEndTime int64
|
||||
|
|
@ -246,7 +247,7 @@ func convertDowntimeRows(
|
|||
for _, row := range idoRows {
|
||||
checkpoint = row.DowntimehistoryId
|
||||
|
||||
if !row.ScheduledStartTime.Valid {
|
||||
if !row.ScheduledStartTime.Valid || row.WasStarted == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
SELECT dh.downtimehistory_id, UNIX_TIMESTAMP(dh.entry_time) entry_time, dh.author_name, dh.comment_data,
|
||||
dh.is_fixed, dh.duration, UNIX_TIMESTAMP(dh.scheduled_start_time) scheduled_start_time,
|
||||
COALESCE(UNIX_TIMESTAMP(dh.scheduled_end_time), 0) scheduled_end_time,
|
||||
COALESCE(UNIX_TIMESTAMP(dh.scheduled_end_time), 0) scheduled_end_time, dh.was_started,
|
||||
COALESCE(UNIX_TIMESTAMP(dh.actual_start_time), 0) actual_start_time, dh.actual_start_time_usec,
|
||||
COALESCE(UNIX_TIMESTAMP(dh.actual_end_time), 0) actual_end_time, dh.actual_end_time_usec, dh.was_cancelled,
|
||||
COALESCE(UNIX_TIMESTAMP(dh.trigger_time), 0) trigger_time, dh.name, o.objecttype_id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue