Merge branch '2007-Monitorizacion-de-cluster-fase-2-migrate-mr' into 'develop'
drop agents foreign keys in tcluster tables - #2007 See merge request artica/pandorafms!1460
This commit is contained in:
commit
b8956ea3af
|
@ -0,0 +1,9 @@
|
|||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE tcluster DROP FOREIGN KEY tcluster_ibfk_1;
|
||||
|
||||
ALTER TABLE tcluster_agent DROP FOREIGN KEY tcluster_agent_ibfk_1;
|
||||
|
||||
ALTER TABLE tcluster_agent DROP FOREIGN KEY tcluster_agent_ibfk_1;
|
||||
|
||||
COMMIT;
|
|
@ -1509,9 +1509,7 @@ create table IF NOT EXISTS `tcluster`(
|
|||
`description` text not null default '',
|
||||
`group` int(10) unsigned NOT NULL default '0',
|
||||
`id_agent` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`id_agent`) REFERENCES tagente(`id_agente`)
|
||||
ON UPDATE CASCADE
|
||||
PRIMARY KEY (`id`)
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
|
@ -1539,8 +1537,6 @@ create table IF NOT EXISTS `tcluster_agent`(
|
|||
`id_cluster` int unsigned not null,
|
||||
`id_agent` int(10) unsigned not null,
|
||||
PRIMARY KEY (`id_cluster`,`id_agent`),
|
||||
FOREIGN KEY (`id_agent`) REFERENCES tagente(`id_agente`)
|
||||
ON UPDATE CASCADE,
|
||||
FOREIGN KEY (`id_cluster`) REFERENCES tcluster(`id`)
|
||||
ON UPDATE CASCADE
|
||||
) engine=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
|
Loading…
Reference in New Issue