diff --git a/pandora_console/extras/mr/15.sql b/pandora_console/extras/mr/15.sql new file mode 100644 index 0000000000..5ea258e5bf --- /dev/null +++ b/pandora_console/extras/mr/15.sql @@ -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; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index d25bafbece..e3572edb04 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -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;