2018-06-21 14:15:27 +02:00
|
|
|
START TRANSACTION;
|
|
|
|
|
|
|
|
ALTER TABLE `tservice` ADD COLUMN `quiet` tinyint(1) NOT NULL DEFAULT '0';
|
|
|
|
ALTER TABLE `tservice` ADD COLUMN `cps` int NOT NULL DEFAULT '0';
|
|
|
|
ALTER TABLE `tservice` ADD COLUMN `cascade_protection` tinyint(1) NOT NULL DEFAULT '0';
|
|
|
|
|
|
|
|
ALTER TABLE `tagente` ADD COLUMN `cps` int NOT NULL DEFAULT '0';
|
|
|
|
|
|
|
|
ALTER TABLE `tmetaconsole_agent` ADD COLUMN `cps` int NOT NULL DEFAULT '0';
|
|
|
|
|
|
|
|
ALTER TABLE `tagente_modulo` ADD COLUMN `cps` int NOT NULL DEFAULT '0';
|
|
|
|
|
2018-07-03 12:01:37 +02:00
|
|
|
CREATE TABLE `tautoconfig` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`name` varchar(100) NOT NULL,
|
|
|
|
`order` int(11) NOT NULL DEFAULT '0',
|
|
|
|
`description` text,
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `tautoconfig_rules` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`id_autoconfig` int(10) unsigned NOT NULL,
|
2018-07-04 19:47:10 +02:00
|
|
|
`order` int(11) NOT NULL DEFAULT '0',
|
2018-07-03 12:01:37 +02:00
|
|
|
`operator` enum('AND','OR') DEFAULT 'OR',
|
|
|
|
`type` enum('alias','ip-range','group','os','custom-field','script') DEFAULT 'alias',
|
2018-07-04 18:39:06 +02:00
|
|
|
`value` text,
|
|
|
|
`custom` text,
|
2018-07-03 12:01:37 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `id_autoconfig` (`id_autoconfig`),
|
|
|
|
CONSTRAINT `tautoconfig_rules_ibfk_1` FOREIGN KEY (`id_autoconfig`) REFERENCES `tautoconfig` (`id`) ON DELETE CASCADE
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `tautoconfig_actions` (
|
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
`id_autoconfig` int(10) unsigned NOT NULL,
|
|
|
|
`order` int(11) NOT NULL DEFAULT '0',
|
2018-07-04 19:47:10 +02:00
|
|
|
`action_type` enum('set-group', 'set-secondary-group', 'apply-policy', 'launch-script', 'launch-event', 'launch-alert-action', 'raw-config') DEFAULT 'launch-event',
|
2018-07-04 18:39:06 +02:00
|
|
|
`value` text,
|
|
|
|
`custom` text,
|
2018-07-03 12:01:37 +02:00
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
KEY `id_autoconfig` (`id_autoconfig`),
|
|
|
|
CONSTRAINT `tautoconfig_action_ibfk_1` FOREIGN KEY (`id_autoconfig`) REFERENCES `tautoconfig` (`id`) ON DELETE CASCADE
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
2018-06-21 14:15:27 +02:00
|
|
|
COMMIT;
|