This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config dump in progress to program status table.
Refs #5080
- Loading branch information
Michael Friedrich
authored and
Michael Friedrich
committed
Nov 15, 2013
1 parent
6df2cee
commit 5145dbb
Showing
12 changed files
with
164 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-- ----------------------------------------- | ||
-- upgrade path for Icinga IDOUtils 1.11.0 | ||
-- | ||
-- ----------------------------------------- | ||
-- Copyright (c) 2013 Icinga Development Team (http://www.icinga.org) | ||
-- | ||
-- Please check http://docs.icinga.org for upgrading information! | ||
-- ----------------------------------------- | ||
|
||
-- ----------------------------------------- | ||
-- config dump in progress | ||
-- ----------------------------------------- | ||
|
||
ALTER TABLE icinga_programstatus ADD COLUMN config_dump_in_progress SMALLINT DEFAULT 0; | ||
|
||
-- ----------------------------------------- | ||
-- update dbversion | ||
-- ----------------------------------------- | ||
|
||
INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.11.0', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.11.0', modify_time=NOW(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
module/idoutils/db/oracle/upgrade/oracle-upgrade-1.11.0.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
-- ----------------------------------------- | ||
-- upgrade path for Icinga IDOUtils 1.11.0 | ||
-- | ||
-- run it as icinga database user from whithin current directory | ||
-- sqlplus icinga@<instance> @ oracle-upgrade-1.11.0.sql | ||
|
||
-- ----------------------------------------- | ||
-- Copyright (c) 2013 Icinga Development Team (http://www.icinga.org) | ||
-- | ||
-- Please check http://docs.icinga.org for upgrading information! | ||
-- ----------------------------------------- | ||
set sqlprompt "&&_USER@&&_CONNECT_IDENTIFIER SQL>" | ||
set pagesize 200; | ||
set linesize 200; | ||
set heading on; | ||
set echo on; | ||
set feedback on; | ||
|
||
define ICINGA_VERSION=1.11.0 | ||
|
||
-- -------------------------------------------------------- | ||
-- warning: edit this script to define existing tablespaces | ||
-- this particular step can be skipped safely if no new | ||
-- table or index included | ||
-- -------------------------------------------------------- | ||
/* set real TBS names on which you have quota, no checks are implemented!*/ | ||
define DATATBS='ICINGA_DATA1'; | ||
define LOBTBS='ICINGA_LOB1'; | ||
define IDXTBS='ICINGA_IDX1'; | ||
|
||
/* load defines from file, if any */ | ||
@icinga_defines.sql | ||
|
||
/* script will be terminated on the first error */ | ||
whenever sqlerror exit failure | ||
spool oracle-upgrade-&&ICINGA_VERSION..log | ||
|
||
-- ----------------------------------------- | ||
-- #5080 config dump in progress | ||
-- ----------------------------------------- | ||
|
||
ALTER TABLE programstatus ADD config_dump_in_progress integer default 0; | ||
|
||
-- ----------------------------------------- | ||
-- finally update dbversion | ||
-- ----------------------------------------- | ||
|
||
MERGE INTO dbversion | ||
USING DUAL ON (name='idoutils') | ||
WHEN MATCHED THEN | ||
UPDATE SET version='&&ICINGA_VERSION', modify_time=CURRENT_TIMESTAMP | ||
WHEN NOT MATCHED THEN | ||
INSERT (id, name, version, create_time, modify_time) VALUES ('1', 'idoutils', '&&ICINGA_VERSION', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); | ||
commit; | ||
|
||
/* last check */ | ||
select object_name,object_type,status from user_objects where status !='VALID'; | ||
|
||
/* goodbye */ | ||
spool off | ||
exit; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-- ----------------------------------------- | ||
-- upgrade path for Icinga IDOUtils 1.11.0 | ||
-- | ||
-- ----------------------------------------- | ||
-- Copyright (c) 2013 Icinga Development Team (http://www.icinga.org) | ||
-- | ||
-- Please check http://docs.icinga.org for upgrading information! | ||
-- ----------------------------------------- | ||
|
||
-- ----------------------------------------- | ||
-- #5050 config dump in progress | ||
-- ----------------------------------------- | ||
|
||
ALTER TABLE icinga_programstatus ADD config_dump_in_progress INTEGER DEFAULT 0; | ||
|
||
-- ----------------------------------------- | ||
-- update dbversion | ||
-- ----------------------------------------- | ||
|
||
SELECT updatedbversion('1.11.0'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters