From e2ccac337e7505cc081e054b1afc163fdeec6944 Mon Sep 17 00:00:00 2001 From: Julien Mathis Date: Thu, 24 Sep 2015 15:28:23 +0200 Subject: [PATCH] fix essor with insertion of Dumper --- .../sql/centreon/Update-DB-2.6.1_to_2.6.2.sql | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/www/install/sql/centreon/Update-DB-2.6.1_to_2.6.2.sql b/www/install/sql/centreon/Update-DB-2.6.1_to_2.6.2.sql index e34b7a30586..1435b045d0e 100644 --- a/www/install/sql/centreon/Update-DB-2.6.1_to_2.6.2.sql +++ b/www/install/sql/centreon/Update-DB-2.6.1_to_2.6.2.sql @@ -2,30 +2,30 @@ INSERT INTO `options` (`key`, `value`) VALUES ('broker_socket_path', '@CENTREONBROKER_VARLIB@/command'); -- Add new configuration information for synchronize database with Centreon Broker -INSERT INTO `cb_module` (`cb_module_id`, `name`, `libname`, `loading_pos`, `is_bundle`, `is_activated`) VALUES -(17, 'Dumper', 'dumper.so', 20, 0, 1); +INSERT INTO `cb_module` (`name`, `libname`, `loading_pos`, `is_bundle`, `is_activated`) VALUES +('Dumper', 'dumper.so', 20, 0, 1); -INSERT INTO `cb_type` (`cb_type_id`, `type_name`, `type_shortname`, `cb_module_id`) VALUES -(28, 'Database configuration reader', 'db_cfg_reader', 17), -(29, 'Database configuration writer', 'db_cfg_writer', 17); +INSERT INTO `cb_type` (`type_name`, `type_shortname`, `cb_module_id`) VALUES +('Database configuration reader', 'db_cfg_reader', (SELECT cb_module_id FROM cb_module WHERE name LIKE 'Dumper')), +('Database configuration writer', 'db_cfg_writer', (SELECT cb_module_id FROM cb_module WHERE name LIKE 'Dumper')); INSERT INTO `cb_type_field_relation` (`cb_type_id`, `cb_field_id`, `is_required`, `order_display`) VALUES -(28, 15, 1, 1), -(28, 7, 1, 2), -(28, 18, 0, 3), -(28, 8, 0, 4), -(28, 9, 0, 5), -(28, 10, 1, 6), -(29, 15, 1, 1), -(29, 7, 1, 2), -(29, 18, 0, 3), -(29, 8, 0, 4), -(29, 9, 0, 5), -(29, 10, 1, 6); +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration reader'), 15, 1, 1), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration reader'), 7, 1, 2), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration reader'), 18, 0, 3), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration reader'), 8, 0, 4), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration reader'), 9, 0, 5), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration reader'), 10, 1, 6), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration writer'), 15, 1, 1), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration writer'), 7, 1, 2), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration writer'), 18, 0, 3), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration writer'), 8, 0, 4), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration writer'), 9, 0, 5), +((SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration writer'), 10, 1, 6); INSERT INTO `cb_tag_type_relation` (`cb_tag_id`, `cb_type_id`, `cb_type_uniq`) VALUES -(1, 28, 1), -(1, 29, 1); +(1, (SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration reader'), 1), +(1, (SELECT cb_type_id FROM cb_type WHERE type_name LIKE 'Database configuration writer'), 1); ALTER TABLE cfg_centreonbroker ADD COLUMN command_file VARCHAR(255);