diff --git a/library/Director/Objects/IcingaNotification.php b/library/Director/Objects/IcingaNotification.php index 781dd6b0..546cb913 100644 --- a/library/Director/Objects/IcingaNotification.php +++ b/library/Director/Objects/IcingaNotification.php @@ -17,7 +17,7 @@ class IcingaNotification extends IcingaObject // 'user_groups' => null, 'times_begin' => null, 'times_end' => null, - 'command' => null, + 'command_id' => null, 'notification_interval' => null, 'period_id' => null, 'zone_id' => null, diff --git a/schema/mysql-migrations/upgrade_71.sql b/schema/mysql-migrations/upgrade_71.sql index 04a067f6..87dbce1e 100644 --- a/schema/mysql-migrations/upgrade_71.sql +++ b/schema/mysql-migrations/upgrade_71.sql @@ -9,7 +9,7 @@ CREATE TABLE icinga_notification ( times_end INT(10) UNSIGNED DEFAULT NULL, notification_interval INT(10) UNSIGNED DEFAULT NULL, command_id INT(10) UNSIGNED DEFAULT NULL, - timeperiod_id INT(10) UNSIGNED DEFAULT NULL, + period_id INT(10) UNSIGNED DEFAULT NULL, zone_id INT(10) UNSIGNED DEFAULT NULL, PRIMARY KEY (id), CONSTRAINT icinga_notification_host @@ -27,8 +27,8 @@ CREATE TABLE icinga_notification ( REFERENCES icinga_command (id) ON DELETE RESTRICT ON UPDATE CASCADE, - CONSTRAINT icinga_notification_timeperiod - FOREIGN KEY timeperiod (timeperiod_id) + CONSTRAINT icinga_notification_period + FOREIGN KEY period (period_id) REFERENCES icinga_timeperiod (id) ON DELETE RESTRICT ON UPDATE CASCADE, diff --git a/schema/mysql.sql b/schema/mysql.sql index e3b68788..e12acdd7 100644 --- a/schema/mysql.sql +++ b/schema/mysql.sql @@ -907,7 +907,7 @@ CREATE TABLE icinga_notification ( times_end INT(10) UNSIGNED DEFAULT NULL, notification_interval INT(10) UNSIGNED DEFAULT NULL, command_id INT(10) UNSIGNED DEFAULT NULL, - timeperiod_id INT(10) UNSIGNED DEFAULT NULL, + period_id INT(10) UNSIGNED DEFAULT NULL, zone_id INT(10) UNSIGNED DEFAULT NULL, PRIMARY KEY (id), CONSTRAINT icinga_notification_host @@ -925,8 +925,8 @@ CREATE TABLE icinga_notification ( REFERENCES icinga_command (id) ON DELETE RESTRICT ON UPDATE CASCADE, - CONSTRAINT icinga_notification_timeperiod - FOREIGN KEY timeperiod (timeperiod_id) + CONSTRAINT icinga_notification_period + FOREIGN KEY period (period_id) REFERENCES icinga_timeperiod (id) ON DELETE RESTRICT ON UPDATE CASCADE,