[icinga-checkins] icinga.org: icinga-core/r1.6: change index names for mysql, to keep the same namings as now in oracle and pgsql

git at icinga.org git at icinga.org
Wed Nov 23 15:02:40 CET 2011


Module: icinga-core
Branch: r1.6
Commit: e39e839345d0ff16d6ff735f918feb1ec7e9eda3
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=e39e839345d0ff16d6ff735f918feb1ec7e9eda3

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Tue Nov 22 22:03:00 2011 +0100

change index names for mysql, to keep the same namings as now in oracle and pgsql

---

 module/idoutils/db/mysql/mysql.sql                 |    6 +++---
 .../db/mysql/upgrade/mysql-upgrade-1.6.0.sql       |   10 ++++------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/module/idoutils/db/mysql/mysql.sql b/module/idoutils/db/mysql/mysql.sql
index b138e68..d33b371 100644
--- a/module/idoutils/db/mysql/mysql.sql
+++ b/module/idoutils/db/mysql/mysql.sql
@@ -1570,11 +1570,11 @@ CREATE INDEX slahist_i_id_o_id_s_ti_s_s_ti_e on icinga_slahistory(instance_id,ob
 -- Icinga Web Notifications
 CREATE INDEX notification_idx ON icinga_notifications(notification_type, object_id, start_time);
 CREATE INDEX notification_object_id_idx ON icinga_notifications(object_id);
-CREATE INDEX notification_idx ON icinga_contactnotifications(notification_id, contact_object_id);
+CREATE INDEX contact_notification_idx ON icinga_contactnotifications(notification_id, contact_object_id);
 CREATE INDEX contacts_object_id_idx ON icinga_contacts(contact_object_id);
-CREATE INDEX notification_idx ON icinga_contactnotificationmethods(contactnotification_id, command_object_id);
+CREATE INDEX contact_notif_meth_notif_idx ON icinga_contactnotificationmethods(contactnotification_id, command_object_id);
 CREATE INDEX command_object_idx ON icinga_commands(object_id); 
-CREATE INDEX services_combined_idx ON icinga_services(service_object_id, host_object_id);
+CREATE INDEX services_combined_object_idx ON icinga_services(service_object_id, host_object_id);
 
 -- -----------------------------------------
 -- set dbversion
diff --git a/module/idoutils/db/mysql/upgrade/mysql-upgrade-1.6.0.sql b/module/idoutils/db/mysql/upgrade/mysql-upgrade-1.6.0.sql
index ba79667..d849bc4 100644
--- a/module/idoutils/db/mysql/upgrade/mysql-upgrade-1.6.0.sql
+++ b/module/idoutils/db/mysql/upgrade/mysql-upgrade-1.6.0.sql
@@ -44,15 +44,13 @@ CREATE INDEX slahist_i_id_o_id_s_ti_s_s_ti_e on icinga_slahistory(instance_id,ob
 -- -----------------------------------------
 -- Icinga Web Notifications
 -- -----------------------------------------
-
 CREATE INDEX notification_idx ON icinga_notifications(notification_type, object_id, start_time);
 CREATE INDEX notification_object_id_idx ON icinga_notifications(object_id);
-CREATE INDEX notification_idx ON icinga_contactnotifications(notification_id, contact_object_id);
+CREATE INDEX contact_notification_idx ON icinga_contactnotifications(notification_id, contact_object_id);
 CREATE INDEX contacts_object_id_idx ON icinga_contacts(contact_object_id);
-CREATE INDEX notification_idx ON icinga_contactnotificationmethods(contactnotification_id, command_object_id);
-CREATE INDEX command_object_idx ON icinga_commands(object_id);                         
-CREATE INDEX services_combined_idx ON icinga_services(service_object_id, host_object_id);
-
+CREATE INDEX contact_notif_meth_notif_idx ON icinga_contactnotificationmethods(contactnotification_id, command_object_id);
+CREATE INDEX command_object_idx ON icinga_commands(object_id);
+CREATE INDEX services_combined_object_idx ON icinga_services(service_object_id, host_object_id);
 
 -- --------------------------------------------------------
 -- move datetimes to timestamps, storing all in UTC





More information about the icinga-checkins mailing list