1923 added new tables to MR and migrate sql script

This commit is contained in:
fbsanchez 2018-03-13 16:38:09 +01:00
parent ed282c6a9b
commit 9b9b46ac65
2 changed files with 60 additions and 0 deletions

View File

@ -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;

View File

@ -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;