IcingaService: add use_var_overrides

This commit is contained in:
Thomas Gelf 2016-09-08 15:01:19 +00:00
parent defb8c50c2
commit b47c7be3d5
5 changed files with 23 additions and 2 deletions

View File

@ -38,6 +38,7 @@ class IcingaService extends IcingaObject
'icon_image' => null,
'icon_image_alt' => null,
'use_agent' => null,
'use_var_overrides' => null,
);
protected $relations = array(
@ -58,6 +59,7 @@ class IcingaService extends IcingaObject
'enable_perfdata' => 'enable_perfdata',
'volatile' => 'volatile',
'use_agent' => 'use_agent',
'use_var_overrides' => 'use_var_overrides',
);
protected $intervalProperties = array(
@ -205,6 +207,11 @@ class IcingaService extends IcingaObject
* @return string
*/
public function renderUse_agent()
{
return '';
}
public function renderUse_var_overrides()
{
// @codingStandardsIgnoreEnd
return '';

View File

@ -0,0 +1,6 @@
ALTER TABLE icinga_service
ADD COLUMN use_var_overrides ENUM('y', 'n') DEFAULT NULL;
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (105, NOW());

View File

@ -557,6 +557,7 @@ CREATE TABLE icinga_service (
icon_image VARCHAR(255) DEFAULT NULL,
icon_image_alt VARCHAR(255) DEFAULT NULL,
use_agent ENUM('y', 'n') DEFAULT NULL,
use_var_overrides ENUM('y', 'n') DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY object_key (object_name, host_id),
CONSTRAINT icinga_service_host
@ -1312,4 +1313,4 @@ CREATE TABLE sync_run (
INSERT INTO director_schema_migration
SET migration_time = NOW(),
schema_version = 104;
schema_version = 105;

View File

@ -0,0 +1,6 @@
ALTER TABLE icinga_service
ADD COLUMN use_var_overrides enum_boolean DEFAULT NULL;
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (105, NOW());

View File

@ -704,6 +704,7 @@ CREATE TABLE icinga_service (
icon_image character varying(255) DEFAULT NULL,
icon_image_alt character varying(255) DEFAULT NULL,
use_agent enum_boolean DEFAULT NULL,
use_var_overrides enum_boolean DEFAULT NULL,
PRIMARY KEY (id),
-- UNIQUE INDEX object_name (object_name, zone_id),
CONSTRAINT icinga_service_host
@ -1532,4 +1533,4 @@ CREATE UNIQUE INDEX notification_inheritance ON icinga_notification_inheritance
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (104, NOW());
VALUES (105, NOW());