schema: do not enforce optional values for endpoints

This commit is contained in:
Thomas Gelf 2015-06-12 22:51:22 +02:00
parent f103434468
commit 564707760e
2 changed files with 9 additions and 4 deletions

View File

@ -0,0 +1,5 @@
ALTER TABLE icinga_endpoint
MODIFY zone_id INT(10) UNSIGNED DEFAULT NULL,
MODIFY port SMALLINT UNSIGNED DEFAULT NULL COMMENT '5665 if not set',
MODIFY log_duration VARCHAR(32) DEFAULT NULL COMMENT '1d if not set';

View File

@ -229,11 +229,11 @@ CREATE TABLE icinga_command_var (
CREATE TABLE icinga_endpoint (
id INT(10) UNSIGNED AUTO_INCREMENT NOT NULL,
zone_id INT(10) UNSIGNED NOT NULL,
zone_id INT(10) UNSIGNED DEFAULT NULL,
object_name VARCHAR(255) NOT NULL,
address VARCHAR(255) DEFAULT NULL COMMENT 'IP address / hostname of remote node',
port SMALLINT UNSIGNED NOT NULL DEFAULT 5665,
log_duration VARCHAR(32) NOT NULL DEFAULT '1d',
port SMALLINT UNSIGNED DEFAULT NULL COMMENT '5665 if not set',
log_duration VARCHAR(32) DEFAULT NULL COMMENT '1d if not set',
object_type ENUM('object', 'template') NOT NULL,
PRIMARY KEY (id),
UNIQUE INDEX object_name (object_name),
@ -348,7 +348,7 @@ CREATE TABLE icinga_service (
enable_flapping ENUM('y', 'n') DEFAULT NULL,
enable_perfdata ENUM('y', 'n') DEFAULT NULL,
event_command_id INT(10) UNSIGNED DEFAULT NULL,
flapping_threshold SMALLINT UNSIGNED default null,
flapping_threshold SMALLINT UNSIGNED DEFAULT NULL,
volatile ENUM('y', 'n') DEFAULT NULL,
zone_id INT(10) UNSIGNED DEFAULT NULL,
command_endpoint_id INT(10) UNSIGNED DEFAULT NULL,