diff --git a/pandora_console/extras/mr/13.sql b/pandora_console/extras/mr/13.sql index 96aae03cb9..dec893c87c 100644 --- a/pandora_console/extras/mr/13.sql +++ b/pandora_console/extras/mr/13.sql @@ -12,4 +12,24 @@ START TRANSACTION; INSERT INTO `tconfig_os` (`id_os`, `name`, `description`, `icon_name`) VALUES (21, 'Cluster', 'Cluster agent', 'so_cluster.png'); -COMMIT; \ No newline at end of file + CREATE TABLE IF NOT EXISTS `tprovisioning`( + `id` int unsigned NOT NULL auto_increment, + `name` varchar(100) NOT NULL, + `description` TEXT default '', + `order` int(11) NOT NULL default 0, + `config` TEXT default '', + PRIMARY KEY (`id`) + ) engine=InnoDB DEFAULT CHARSET=utf8; + + CREATE TABLE IF NOT EXISTS `tprovisioning_rules`( + `id` int unsigned NOT NULL auto_increment, + `id_provisioning` int unsigned NOT NULL, + `order` int(11) NOT NULL default 0, + `operator` enum('AND','OR') default 'OR', + `type` enum('alias','ip-range') default 'alias', + `value` varchar(100) NOT NULL default '', + PRIMARY KEY (`id`), + FOREIGN KEY (`id_provisioning`) REFERENCES tprovisioning(`id`) + ON DELETE CASCADE + ) engine=InnoDB DEFAULT CHARSET=utf8; +COMMIT; 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..25c4a0ef10 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,30 @@ create table IF NOT EXISTS `tcluster_agent`( FOREIGN KEY (`id_cluster`) REFERENCES tcluster(`id`) ON UPDATE CASCADE ) engine=InnoDB DEFAULT CHARSET=utf8; + +-- --------------------------------------------------------------------- +-- Table `tprovisioning` +-- --------------------------------------------------------------------- +create table IF NOT EXISTS `tprovisioning`( + `id` int unsigned NOT NULL auto_increment, + `name` varchar(100) NOT NULL, + `description` TEXT default '', + `order` int(11) NOT NULL default 0, + `config` TEXT default '', + PRIMARY KEY (`id`) +) engine=InnoDB DEFAULT CHARSET=utf8; + +-- --------------------------------------------------------------------- +-- Table `tprovisioning_rules` +-- --------------------------------------------------------------------- +create table IF NOT EXISTS `tprovisioning_rules`( + `id` int unsigned NOT NULL auto_increment, + `id_provisioning` int unsigned NOT NULL, + `order` int(11) NOT NULL default 0, + `operator` enum('AND','OR') default 'OR', + `type` enum('alias','ip-range') default 'alias', + `value` varchar(100) NOT NULL default '', + PRIMARY KEY (`id`), + FOREIGN KEY (`id_provisioning`) REFERENCES tprovisioning(`id`) + ON DELETE CASCADE +) engine=InnoDB DEFAULT CHARSET=utf8;