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-12 10:24:46 +02:00
|
|
|
ALTER TABLE `treport_content` MODIFY COLUMN `name` varchar(300) NULL;
|
|
|
|
|
2019-07-23 13:01:50 +02:00
|
|
|
CREATE TABLE `tagent_repository` (
|
2019-07-10 23:59:09 +02:00
|
|
|
`id` SERIAL,
|
|
|
|
`id_os` INT(10) UNSIGNED DEFAULT 0,
|
|
|
|
`arch` ENUM('x64', 'x86') DEFAULT 'x64',
|
2019-07-23 13:01:50 +02:00
|
|
|
`version` VARCHAR(10) DEFAULT '',
|
|
|
|
`path` text,
|
|
|
|
`uploaded_by` VARCHAR(100) DEFAULT '',
|
|
|
|
`uploaded` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was uploaded",
|
2019-07-10 23:59:09 +02:00
|
|
|
`last_err` text,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-07-23 13:01:50 +02:00
|
|
|
FOREIGN KEY (`id_os`) REFERENCES `tconfig_os`(`id_os`)
|
2019-07-17 20:37:13 +02:00
|
|
|
ON UPDATE CASCADE ON DELETE CASCADE
|
2019-07-10 23:59:09 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
2019-07-23 13:01:50 +02:00
|
|
|
CREATE TABLE `tdeployment_hosts` (
|
2019-07-17 20:37:13 +02:00
|
|
|
`id` SERIAL,
|
2019-07-23 13:01:50 +02:00
|
|
|
`id_cs` VARCHAR(100),
|
|
|
|
`ip` VARCHAR(100) NOT NULL UNIQUE,
|
2019-07-17 20:37:13 +02:00
|
|
|
`id_os` INT(10) UNSIGNED DEFAULT 0,
|
2019-07-23 13:01:50 +02:00
|
|
|
`os_version` VARCHAR(100) DEFAULT '' COMMENT "OS version in STR format",
|
2019-07-17 20:37:13 +02:00
|
|
|
`arch` ENUM('x64', 'x86') DEFAULT 'x64',
|
2019-07-23 13:01:50 +02:00
|
|
|
`current_agent_version` VARCHAR(100) DEFAULT '' COMMENT "String latest installed agent",
|
|
|
|
`target_agent_version_id` BIGINT UNSIGNED,
|
|
|
|
`deployed` bigint(20) NOT NULL DEFAULT 0 COMMENT "When it was deployed",
|
2019-07-24 17:38:25 +02:00
|
|
|
`server_ip` varchar(100) default NULL COMMENT "Where to point target agent",
|
2019-07-17 20:37:13 +02:00
|
|
|
`last_err` text,
|
|
|
|
PRIMARY KEY (`id`),
|
2019-07-23 13:01:50 +02:00
|
|
|
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,
|
|
|
|
FOREIGN KEY (`target_agent_version_id`) REFERENCES `tagent_repository`(`id`)
|
|
|
|
ON UPDATE CASCADE ON DELETE SET NULL
|
2019-07-17 20:37:13 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
2019-07-17 17:19:58 +02:00
|
|
|
COMMIT;
|