From 9b9b46ac65b4b7b19f09c544c5716f00f4c1b71b Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 13 Mar 2018 16:38:09 +0100 Subject: [PATCH] 1923 added new tables to MR and migrate sql script --- pandora_console/extras/mr/13.sql | 25 +++++++++++++ .../pandoradb_migrate_6.0_to_7.0.mysql.sql | 35 +++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/pandora_console/extras/mr/13.sql b/pandora_console/extras/mr/13.sql index 96aae03cb9..ccf8b35725 100644 --- a/pandora_console/extras/mr/13.sql +++ b/pandora_console/extras/mr/13.sql @@ -12,4 +12,29 @@ START TRANSACTION; INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`) VALUES (21, 'Cluster', 'Cluster agent', 'so_cluster.png'); + create table IF NOT EXISTS `tmigration_queue`( + `id` int unsigned not null auto_increment, + `id_source_agent` int unsigned not null, + `id_target_agent` int unsigned not null, + `id_source_node` int unsigned not null, + `id_target_node` int unsigned not null, + `priority` int unsigned default 0, + `step` int default 0, + `running` tinyint(2) default 0, + `active_db_only` tinyint(2) default 0, + PRIMARY KEY(`id`) + ) engine=InnoDB DEFAULT CHARSET=utf8; + + create table IF NOT EXISTS `tmigration_module_queue`( + `id` int unsigned not null auto_increment, + `id_migration` int unsigned not null, + `id_source_agentmodule` int unsigned not null, + `id_target_agentmodule` int unsigned not null, + `last_replication_timestamp` bigint(20) NOT NULL default 0, + PRIMARY KEY(`id`), + FOREIGN KEY(`id_migration`) REFERENCES tmigration_queue(`id`) + ON DELETE CASCADE + ON UPDATE CASCADE + ) engine=InnoDB DEFAULT CHARSET=utf8; + 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 4e292b4f0d..67c6847423 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 @@ -1533,3 +1533,38 @@ create table IF NOT EXISTS `tcluster_agent`( FOREIGN KEY (`id_cluster`) REFERENCES tcluster(`id`) ON UPDATE CASCADE ) engine=InnoDB DEFAULT CHARSET=utf8; + + +-- --------------------------------------------------------------------- +-- Table `tmigration_queue` +-- --------------------------------------------------------------------- + +create table IF NOT EXISTS `tmigration_queue`( + `id` int unsigned not null auto_increment, + `id_source_agent` int unsigned not null, + `id_target_agent` int unsigned not null, + `id_source_node` int unsigned not null, + `id_target_node` int unsigned not null, + `priority` int unsigned default 0, + `step` int default 0, + `running` tinyint(2) default 0, + `active_db_only` tinyint(2) default 0, + PRIMARY KEY(`id`) +) engine=InnoDB DEFAULT CHARSET=utf8; + +-- --------------------------------------------------------------------- +-- Table `tmigration_module_queue` +-- --------------------------------------------------------------------- + +create table IF NOT EXISTS `tmigration_module_queue`( + `id` int unsigned not null auto_increment, + `id_migration` int unsigned not null, + `id_source_agentmodule` int unsigned not null, + `id_target_agentmodule` int unsigned not null, + `last_replication_timestamp` bigint(20) NOT NULL default 0, + PRIMARY KEY(`id`), + FOREIGN KEY(`id_migration`) REFERENCES tmigration_queue(`id`) + ON DELETE CASCADE + ON UPDATE CASCADE +) engine=InnoDB DEFAULT CHARSET=utf8; +