[Secondary Groups] Added tagent_secondary_group table and tusuario_perfil.is_secondary field

This commit is contained in:
fermin831 2018-03-20 13:29:17 +01:00
parent 972e394a8e
commit f493583fee
1 changed files with 17 additions and 0 deletions

View File

@ -1131,6 +1131,7 @@ CREATE TABLE IF NOT EXISTS `tusuario_perfil` (
`id_usuario` varchar(100) NOT NULL default '', `id_usuario` varchar(100) NOT NULL default '',
`id_perfil` int(10) unsigned NOT NULL default '0', `id_perfil` int(10) unsigned NOT NULL default '0',
`id_grupo` int(10) NOT NULL default '0', `id_grupo` int(10) NOT NULL default '0',
`is_secondary` tinyint(1) NOT NULL default 0,
`assigned_by` varchar(100) NOT NULL default '', `assigned_by` varchar(100) NOT NULL default '',
`id_policy` int(10) unsigned NOT NULL default '0', `id_policy` int(10) unsigned NOT NULL default '0',
`tags` text NOT NULL, `tags` text NOT NULL,
@ -3140,3 +3141,19 @@ create table IF NOT EXISTS `tmigration_module_queue`(
ON DELETE CASCADE ON DELETE CASCADE
ON UPDATE CASCADE ON UPDATE CASCADE
) engine=InnoDB DEFAULT CHARSET=utf8; ) engine=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tagent_secondary_group`
-- ---------------------------------------------------------------------
create table IF NOT EXISTS `tagent_secondary_group`(
`id` int unsigned not null auto_increment,
`id_agent` int(10) unsigned NOT NULL,
`id_group` mediumint(4) unsigned NOT NULL,
PRIMARY KEY(`id`),
FOREIGN KEY(`id_agent`) REFERENCES tagente(`id_agente`)
ON DELETE CASCADE,
FOREIGN KEY(`id_group`) REFERENCES tgrupo(`id_grupo`)
ON DELETE CASCADE
) engine=InnoDB DEFAULT CHARSET=utf8;