pandorafms/pandora_console/extras/mr/30.sql

42 lines
1.7 KiB
MySQL
Raw Normal View History

2019-07-02 11:50:58 +02:00
START TRANSACTION;
ALTER TABLE `treport_content_sla_combined` ADD `id_agent_module_failover` int(10) unsigned NOT NULL;
ALTER TABLE `treport_content` ADD COLUMN `failover_mode` tinyint(1) DEFAULT '0';
ALTER TABLE `treport_content` ADD COLUMN `failover_type` tinyint(1) DEFAULT '0';
ALTER TABLE `treport_content_template` ADD COLUMN `failover_mode` tinyint(1) DEFAULT '1';
ALTER TABLE `treport_content_template` ADD COLUMN `failover_type` tinyint(1) DEFAULT '1';
2019-07-03 17:51:47 +02:00
ALTER TABLE `tmodule_relationship` ADD COLUMN `type` ENUM('direct', 'failover') DEFAULT 'direct';
2019-07-10 23:59:09 +02:00
CREATE TABLE `ttask_credentials` (
`id_rt` int(10) unsigned NOT NULL,
`identifier` varchar(100) NOT NULL,
PRIMARY KEY (`id_rt`,`identifier`),
KEY `identifier` (`identifier`),
FOREIGN KEY (`id_rt`) REFERENCES `trecon_task` (`id_rt`)
ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY (`identifier`) REFERENCES `tcredential_store` (`identifier`)
ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tdeployment_hosts` (
`id` SERIAL,
`id_cs` VARCHAR(100),
2019-07-15 19:37:04 +02:00
`ip` VARCHAR(100) NOT NULL UNIQUE,
2019-07-10 23:59:09 +02:00
`id_os` INT(10) UNSIGNED DEFAULT 0,
`os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format",
`arch` ENUM('x64', 'x86') DEFAULT 'x64',
`current_agent_version` VARCHAR(100) DEFAULT '',
`desired_agent_version` VARCHAR(100) DEFAULT '',
2019-07-16 20:56:47 +02:00
`deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed",
2019-07-10 23:59:09 +02:00
`last_err` text,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_cs`) REFERENCES `tcredential_store` (`identifier`)
ON UPDATE CASCADE ON DELETE SET NULL,
FOREIGN KEY (`id_os`) REFERENCES tconfig_os(`id_os`)
ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2019-07-02 11:50:58 +02:00
COMMIT;