Working in the tags out the policies. Ticket: #1577

This commit is contained in:
mdtrooper 2014-12-10 13:36:42 +01:00
parent 8633186b0e
commit 8c3a5cedb7
6 changed files with 40 additions and 15 deletions

View File

@ -20,3 +20,13 @@ ALTER TABLE tlayout_data ADD COLUMN `fill_color` varchar(200) DEFAULT "";
INSERT INTO `tconfig_os` (`name`, `description`, `icon_name`) VALUES ('Mainframe', 'Mainframe agent', 'so_mainframe.png');
-- ---------------------------------------------------------------------
-- Table `ttag_module`
-- ---------------------------------------------------------------------
ALTER TABLE ttag_module ADD COLUMN `id_policy_module` int(10) NOT NULL DEFAULT 0;
UPDATE ttag_module AS t1
SET t1.id_policy_module = (
SELECT t2.id_policy_module
FROM tagente_modulo AS t2
WHERE t1.id_agente_modulo = t2.id_agente_modulo);

View File

@ -12,4 +12,10 @@ ALTER TABLE tlayout_data DROP COLUMN no_link_color;
ALTER TABLE tlayout_data DROP COLUMN label_color;
ALTER TABLE tlayout_data ADD COLUMN border_width INTEGER NOT NULL default 0;
ALTER TABLE tlayout_data ADD COLUMN border_color varchar(200) DEFAULT "";
ALTER TABLE tlayout_data ADD COLUMN fill_color varchar(200) DEFAULT "";
ALTER TABLE tlayout_data ADD COLUMN fill_color varchar(200) DEFAULT "";
-- ---------------------------------------------------------------------
-- Table `ttag_module`
-- ---------------------------------------------------------------------
ALTER TABLE tlayout_data ADD COLUMN id_policy_module NUMBER(10, 0) DEFAULT 0 NOT NULL;

View File

@ -12,4 +12,10 @@ ALTER TABLE "tlayout_data" DROP COLUMN "no_link_color";
ALTER TABLE "tlayout_data" DROP COLUMN "label_color";
ALTER TABLE "tlayout_data" ADD COLUMN "border_width" INTEGER NOT NULL default 0;
ALTER TABLE "tlayout_data" ADD COLUMN "border_color" varchar(200) DEFAULT "";
ALTER TABLE "tlayout_data" ADD COLUMN "fill_color" varchar(200) DEFAULT "";
ALTER TABLE "tlayout_data" ADD COLUMN "fill_color" varchar(200) DEFAULT "";
-- ---------------------------------------------------------------------
-- Table `ttag_module`
-- ---------------------------------------------------------------------
ALTER TABLE tlayout_data ADD COLUMN "id_policy_module" INTEGER NOT NULL DEFAULT 0;

View File

@ -1700,10 +1700,11 @@ CREATE OR REPLACE TRIGGER ttag_inc BEFORE INSERT ON ttag REFERENCING NEW AS NEW
-- Table "ttag_module"
-- ---------------------------------------------------------------------
CREATE TABLE ttag_module (
id_tag NUMBER(10, 0) NOT NULL,
id_agente_modulo NUMBER(10, 0) DEFAULT 0 NOT NULL,
PRIMARY KEY (id_tag, id_agente_modulo)
CREATE TABLE ttag_module (
id_tag NUMBER(10, 0) NOT NULL,
id_agente_modulo NUMBER(10, 0) DEFAULT 0 NOT NULL,
id_policy_module NUMBER(10, 0) DEFAULT 0 NOT NULL,
PRIMARY KEY (id_tag, id_agente_modulo)
);
CREATE INDEX ttag_module_id_ag_modulo_idx ON ttag_module(id_agente_modulo);
@ -1713,9 +1714,9 @@ CREATE INDEX ttag_module_id_ag_modulo_idx ON ttag_module(id_agente_modulo);
-- ---------------------------------------------------------------------
CREATE TABLE ttag_policy_module (
id_tag NUMBER(10, 0) NOT NULL,
id_policy_module NUMBER(10, 0) DEFAULT 0 NOT NULL,
PRIMARY KEY (id_tag, id_policy_module)
id_tag NUMBER(10, 0) NOT NULL,
id_policy_module NUMBER(10, 0) DEFAULT 0 NOT NULL,
PRIMARY KEY (id_tag, id_policy_module)
);
CREATE INDEX ttag_poli_mod_id_pol_mo_idx ON ttag_policy_module(id_policy_module);

View File

@ -1497,9 +1497,10 @@ CREATE TABLE "ttag" (
-- Table "ttag_module"
-- ---------------------------------------------------------------------
CREATE TABLE "ttag_module" (
"id_tag" INTEGER NOT NULL,
"id_agente_modulo" INTEGER NOT NULL DEFAULT 0,
CREATE TABLE "ttag_module" (
"id_tag" INTEGER NOT NULL,
"id_agente_modulo" INTEGER NOT NULL DEFAULT 0,
"id_policy_module" INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (id_tag, id_agente_modulo)
);

View File

@ -1583,9 +1583,10 @@ CREATE TABLE IF NOT EXISTS `ttag` (
-- -----------------------------------------------------
-- Table `ttag_module`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ttag_module` (
`id_tag` int(10) NOT NULL,
`id_agente_modulo` int(10) NOT NULL DEFAULT 0,
CREATE TABLE IF NOT EXISTS `ttag_module` (
`id_tag` int(10) NOT NULL,
`id_agente_modulo` int(10) NOT NULL DEFAULT 0,
`id_policy_module` int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (id_tag, id_agente_modulo),
KEY `idx_id_agente_modulo` (`id_agente_modulo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;