From: Michael Friedrich Date: Wed, 23 Mar 2016 13:03:44 +0000 (+0100) Subject: Ensure that the legacy_id attribute for comment/downtime objects is restored on restart X-Git-Tag: v2.5.0~452 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0447e81d9994328a8363345ecfc9a734d8da3430;p=icinga2 Ensure that the legacy_id attribute for comment/downtime objects is restored on restart This has been changed when moving comments/downtimes to config objects in 050c520b2a3df0477f2eec71ec2d874b6dd36aa5 It may cause trouble with DB IDO DELETE and UPDATE statements depending on the old value. refs #11382 --- diff --git a/lib/icinga/comment.ti b/lib/icinga/comment.ti index 8e76a8b3d..8ac497aac 100644 --- a/lib/icinga/comment.ti +++ b/lib/icinga/comment.ti @@ -88,7 +88,7 @@ class Comment : ConfigObject < CommentNameComposer [config, required] String author; [config, required] String text; [config] double expire_time; - int legacy_id; + [state] int legacy_id; }; } diff --git a/lib/icinga/downtime.ti b/lib/icinga/downtime.ti index 774cc1d26..d5a16988a 100644 --- a/lib/icinga/downtime.ti +++ b/lib/icinga/downtime.ti @@ -81,7 +81,7 @@ class Downtime : ConfigObject < DowntimeNameComposer [state] Array::Ptr triggers { default {{{ return new Array(); }}} }; - int legacy_id; + [state] int legacy_id; [state] bool was_cancelled; [config] String config_owner; };