[icinga-checkins] icinga.org: icinga-core/r1.3: fix dbversion primary key sequence usage ( thx formorer)

git at icinga.org git at icinga.org
Wed Jan 12 14:24:32 CET 2011


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Wed Jan 12 14:23:24 2011 +0100

fix dbversion primary key sequence usage (thx formorer)

---

 module/idoutils/db/oracle/oracle-upgrade-1.3.0.sql |    2 +-
 module/idoutils/db/oracle/oracle.sql               |    2 +-
 module/idoutils/db/pgsql/pgsql-upgrade-1.3.0.sql   |    2 +-
 module/idoutils/db/pgsql/pgsql.sql                 |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/module/idoutils/db/oracle/oracle-upgrade-1.3.0.sql b/module/idoutils/db/oracle/oracle-upgrade-1.3.0.sql
index 514c2e8..d69bd3b 100644
--- a/module/idoutils/db/oracle/oracle-upgrade-1.3.0.sql
+++ b/module/idoutils/db/oracle/oracle-upgrade-1.3.0.sql
@@ -22,7 +22,7 @@ USING DUAL ON (name='idoutils')
 WHEN MATCHED THEN
 UPDATE SET version='1.3.0'
 WHEN NOT MATCHED THEN
-INSERT (name, version) VALUES ('idoutils', '1.3.0');
+INSERT (id, name, version) VALUES ('1', 'idoutils', '1.3.0');
 
 -- -----------------------------------------
 -- add index for statehistory
diff --git a/module/idoutils/db/oracle/oracle.sql b/module/idoutils/db/oracle/oracle.sql
index 845dbc3..25b40c2 100644
--- a/module/idoutils/db/oracle/oracle.sql
+++ b/module/idoutils/db/oracle/oracle.sql
@@ -103,7 +103,7 @@ END;
 -- -----------------------------------------
 -- set dbversion
 -- -----------------------------------------
-INSERT INTO dbversion (name, version) VALUES ('idoutils', '1.3.0');
+INSERT INTO dbversion (id, name, version) VALUES ('1', 'idoutils', '1.3.0');
 
 
 
diff --git a/module/idoutils/db/pgsql/pgsql-upgrade-1.3.0.sql b/module/idoutils/db/pgsql/pgsql-upgrade-1.3.0.sql
index 3acd962..f946128 100644
--- a/module/idoutils/db/pgsql/pgsql-upgrade-1.3.0.sql
+++ b/module/idoutils/db/pgsql/pgsql-upgrade-1.3.0.sql
@@ -24,7 +24,7 @@ BEGIN
 		UPDATE icinga_dbversion
 		SET version=version_i WHERE name='idoutils';
 	ELSE
-		INSERT INTO icinga_dbversion (name, version) VALUES ('idoutils', version_i);
+		INSERT INTO icinga_dbversion (dbversion_id, name, version) VALUES ('1', 'idoutils', version_i);
 	END IF;
 
 	RETURN;
diff --git a/module/idoutils/db/pgsql/pgsql.sql b/module/idoutils/db/pgsql/pgsql.sql
index c7c0e99..bd01e45 100644
--- a/module/idoutils/db/pgsql/pgsql.sql
+++ b/module/idoutils/db/pgsql/pgsql.sql
@@ -34,7 +34,7 @@ BEGIN
                 UPDATE icinga_dbversion
                 SET version=version_i WHERE name='idoutils';
         ELSE
-                INSERT INTO icinga_dbversion (name, version) VALUES ('idoutils', version_i);
+                INSERT INTO icinga_dbversion (dbversion_id, name, version) VALUES ('1', 'idoutils', version_i);
         END IF;
 
         RETURN;





More information about the icinga-checkins mailing list