Migrate sql meta policies (add id_node)
This commit is contained in:
parent
223d13edd5
commit
b6347072c5
|
@ -14,4 +14,8 @@ ALTER TABLE `tservice` ADD COLUMN `evaluate_sla` int(1) NOT NULL DEFAULT '0';
|
|||
|
||||
ALTER TABLE `tpolicy_modules` ADD COLUMN `cps` int NOT NULL DEFAULT '0';
|
||||
|
||||
DROP INDEX id_policy ON `tpolicy_agents`;
|
||||
ALTER TABLE `tpolicy_agents` ADD COLUMN `id_node` int(10) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `tpolicy_agents` ADD UNIQUE(`id_policy`, `id_agent`, `id_node`);
|
||||
|
||||
COMMIT;
|
|
@ -2206,8 +2206,10 @@ CREATE TABLE IF NOT EXISTS `tpolicy_agents` (
|
|||
`policy_applied` tinyint(1) unsigned default '0',
|
||||
`pending_delete` tinyint(1) unsigned default '0',
|
||||
`last_apply_utimestamp` int(10) unsigned NOT NULL default 0,
|
||||
`id_service` int(10) unsigned NOT NULL default 0,
|
||||
`id_node` int(10) NOT NULL default 0,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (`id_policy`, `id_agent`)
|
||||
UNIQUE (`id_policy`, `id_agent`, `id_node`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue