Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
correct pgsql index drop (thx formorer)
Browse files Browse the repository at this point in the history
refs #4953
  • Loading branch information
Michael Friedrich committed Oct 29, 2013
1 parent 32831fd commit dbd643c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.10.0.sql
Expand Up @@ -29,29 +29,29 @@ ALTER TABLE icinga_scheduleddowntime ALTER COLUMN duration TYPE BIGINT;
-- -----------------------------------------

-- drop index too, if seperate tbs
ALTER TABLE icinga_timedevents DROP INDEX timedevents_i_id_idx;
ALTER TABLE icinga_timedevents DROP INDEX timedevents_time_id_idx;
ALTER TABLE icinga_timedevents DROP INDEX timed_e_event_type_idx;
ALTER TABLE icinga_timedevents DROP INDEX timed_e_object_id_idx;
ALTER TABLE icinga_timedevents DROP INDEX timed_e_rec_ev_idx;
DROP INDEX IF EXISTS timedevents_i_id_idx;
DROP INDEX IF EXISTS timedevents_time_id_idx;
DROP INDEX IF EXISTS timed_e_event_type_idx;
DROP INDEX IF EXISTS timed_e_object_id_idx;
DROP INDEX IF EXISTS timed_e_rec_ev_idx;

ALTER TABLE icinga_timedeventqueue DROP INDEX timedeventq_i_id_idx;
ALTER TABLE icinga_timedeventqueue DROP INDEX timedeventq_time_id_idx;
ALTER TABLE icinga_timedeventqueue DROP INDEX timedeventqueue_i_id_idx;
ALTER TABLE icinga_timedeventqueue DROP INDEX timed_e_q_event_type_idx;
ALTER TABLE icinga_timedeventqueue DROP INDEX timed_e_q_sched_time_idx;
ALTER TABLE icinga_timedeventqueue DROP INDEX timed_e_q_object_id_idx;
ALTER TABLE icinga_timedeventqueue DROP INDEX timed_e_q_rec_ev_id_idx;
DROP INDEX IF EXISTS timedeventq_i_id_idx;
DROP INDEX IF EXISTS timedeventq_time_id_idx;
DROP INDEX IF EXISTS timedeventqueue_i_id_idx;
DROP INDEX IF EXISTS timed_e_q_event_type_idx;
DROP INDEX IF EXISTS timed_e_q_sched_time_idx;
DROP INDEX IF EXISTS timed_e_q_object_id_idx;
DROP INDEX IF EXISTS timed_e_q_rec_ev_id_idx;

DROP TABLE icinga_timedevents;
DROP TABLE icinga_timedeventqueue;
DROP TABLE IF EXISTS icinga_timedevents;
DROP TABLE IF EXISTS icinga_timedeventqueue;

-- -----------------------------------------
-- #4544 icinga_comments table UK
-- -----------------------------------------

ALTER TABLE icinga_comments DROP CONSTRAINT uq_comments;
ALTER TABLE icinga_commenthistory DROP CONSTRAINT uq_commenthistory;
ALTER TABLE icinga_comments DROP CONSTRAINT IF EXISTS uq_comments;
ALTER TABLE icinga_commenthistory DROP CONSTRAINT IF EXISTS uq_commenthistory;

ALTER TABLE icinga_comments ADD CONSTRAINT uq_comments UNIQUE (instance_id,object_id,comment_time,internal_comment_id);
ALTER TABLE icinga_commenthistory ADD CONSTRAINT uq_commenthistory UNIQUE (instance_id,object_id,comment_time,internal_comment_id);
Expand Down

0 comments on commit dbd643c

Please sign in to comment.