[icinga-checkins] icinga.org: icinga-core/test/cgis: create unique indizes in postgresql schema changes

git at icinga.org git at icinga.org
Sun Dec 4 01:15:39 CET 2011


Module: icinga-core
Branch: test/cgis
Commit: 46ba3bd1f4add181ace3f0d6b4c87ad6857f9389
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=46ba3bd1f4add181ace3f0d6b4c87ad6857f9389

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

create unique indizes in postgresql schema changes

---

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

diff --git a/module/idoutils/db/pgsql/pgsql.sql b/module/idoutils/db/pgsql/pgsql.sql
index 0726a40..4ccaa76 100644
--- a/module/idoutils/db/pgsql/pgsql.sql
+++ b/module/idoutils/db/pgsql/pgsql.sql
@@ -1594,11 +1594,11 @@ CREATE INDEX loge_inst_id_time_idx on icinga_logentries (instance_id, logentry_t
 -- 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);
 
 -- statehistory
 CREATE INDEX statehist_i_id_o_id_s_ty_s_ti on icinga_statehistory(instance_id, object_id, state_type, state_time);
diff --git a/module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.6.0.sql b/module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.6.0.sql
index 63c736e..4e85f13 100644
--- a/module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.6.0.sql
+++ b/module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.6.0.sql
@@ -45,11 +45,11 @@ CREATE INDEX slahist_i_id_o_id_s_ti_s_s_ti_e on icinga_slahistory(instance_id,ob
 
 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);
 
 -- -----------------------------------------
 -- modify timestamp to use time zone, #2106





More information about the icinga-checkins mailing list