[icinga-checkins] icinga.org: icinga-core/dev/ido: set schema version to 1.8.0, fix bug in mysql regex due to create|modify_time

git at icinga.org git at icinga.org
Mon Aug 20 15:28:24 CEST 2012


Module: icinga-core
Branch: dev/ido
Commit: 9356320d58e7265dbb2e30fd7eb16faf4d62eeea
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=9356320d58e7265dbb2e30fd7eb16faf4d62eeea

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Aug 20 15:26:12 2012 +0200

set schema version to 1.8.0, fix bug in mysql regex due to create|modify_time

---

 module/idoutils/db/mysql/mysql.sql      |    2 +-
 module/idoutils/db/oracle/oracle.sql    |    2 +-
 module/idoutils/db/pgsql/pgsql.sql      |    2 +-
 module/idoutils/db/scripts/installdb.in |    2 +-
 module/idoutils/include/common.h        |    2 +-
 update-version-schema                   |    6 +++---
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/module/idoutils/db/mysql/mysql.sql b/module/idoutils/db/mysql/mysql.sql
index e68bb3f..fccd102 100644
--- a/module/idoutils/db/mysql/mysql.sql
+++ b/module/idoutils/db/mysql/mysql.sql
@@ -1589,6 +1589,6 @@ CREATE INDEX services_combined_object_idx ON icinga_services(service_object_id,
 -- -----------------------------------------
 -- set dbversion
 -- -----------------------------------------
-INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.7.0', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.7.0', modify_time=NOW();
+INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.8.0', NOW(), NOW()) ON DUPLICATE KEY UPDATE version='1.8.0', modify_time=NOW();
 
 
diff --git a/module/idoutils/db/oracle/oracle.sql b/module/idoutils/db/oracle/oracle.sql
index 2301940..101516b 100644
--- a/module/idoutils/db/oracle/oracle.sql
+++ b/module/idoutils/db/oracle/oracle.sql
@@ -21,7 +21,7 @@
 -- -- --------------------------------------------------------
 */
 
-DEFINE ICINGA_VERSION=1.7.0
+DEFINE ICINGA_VERSION=1.8.0
 
 -- -----------------------------------------
 -- set defines
diff --git a/module/idoutils/db/pgsql/pgsql.sql b/module/idoutils/db/pgsql/pgsql.sql
index 2105ebc..298c33c 100644
--- a/module/idoutils/db/pgsql/pgsql.sql
+++ b/module/idoutils/db/pgsql/pgsql.sql
@@ -1619,5 +1619,5 @@ CREATE INDEX slahist_i_id_o_id_s_ti_s_s_ti_e on icinga_slahistory(instance_id,ob
 -- set dbversion
 -- -----------------------------------------
 
-SELECT updatedbversion('1.7.0');
+SELECT updatedbversion('1.8.0');
 
diff --git a/module/idoutils/db/scripts/installdb.in b/module/idoutils/db/scripts/installdb.in
index 2971e67..4c53b2d 100755
--- a/module/idoutils/db/scripts/installdb.in
+++ b/module/idoutils/db/scripts/installdb.in
@@ -45,7 +45,7 @@ my $dbh = DBI->connect("DBI:mysql:database=$database;host=$hostname",
 		or die "Cannot connect to database";
 
 # Current database version
-my $thisversion="1.7.0";
+my $thisversion="1.8.0";
 
 # Create version table if it doesn't exist
 eval { $dbh->do("SELECT * FROM icinga_dbversion LIMIT 1") };
diff --git a/module/idoutils/include/common.h b/module/idoutils/include/common.h
index dfaaf83..cda52fe 100644
--- a/module/idoutils/include/common.h
+++ b/module/idoutils/include/common.h
@@ -25,7 +25,7 @@
 #define IDO_DATE "10-17-2012"
 #define IDO_VERSION "1.8.0dev"
 
-#define IDO_SCHEMA_VERSION "1.7.0"
+#define IDO_SCHEMA_VERSION "1.8.0"
 
 #define IDO_COPYRIGHT 		"Copyright(c) 2005-2008 Ethan Galstad, Copyright(c) 2009-2012 Icinga Development Team (https://www.icinga.org)"
 #define IDO_LICENSE 		"License: GPL v2"
diff --git a/update-version-schema b/update-version-schema
index 2293ca8..e263923 100755
--- a/update-version-schema
+++ b/update-version-schema
@@ -10,10 +10,10 @@ else
 fi
 
 # Current version number
-CURRENTVERSION=1.7.0
+CURRENTVERSION=1.8.0
 
 # Last date
-LASTDATE=04-27-2012
+LASTDATE=08-20-2012
 
 if [ "x$1" = "x" ]
 then
@@ -60,7 +60,7 @@ perl -i -p -e "s/IDO_SCHEMA_VERSION \".*\"/IDO_SCHEMA_VERSION \"$newversion\"/;"
 # pgsql SELECT updatedbversion('1.3.0');
 # oracle DEFINE ICINGA_VERSION=1.3.0
 
-perl -i -p -e "s/VALUES \(\'idoutils\', \'.*\'\)/VALUES \(\'idoutils\', \'$newversion\'\)/;" module/idoutils/db/mysql/mysql.sql
+perl -i -p -e "s/VALUES \(\'idoutils\', \'.*\', NOW\(\), NOW\(\)\)/VALUES \(\'idoutils\', \'$newversion\', NOW\(\), NOW\(\)\)/;" module/idoutils/db/mysql/mysql.sql
 perl -i -p -e "s/version=\'.*\'/version=\'$newversion\'/;" module/idoutils/db/mysql/mysql.sql
 perl -i -p -e "s/updatedbversion\(\'.*\'\)/updatedbversion\(\'$newversion\'\)/;" module/idoutils/db/pgsql/pgsql.sql
 perl -i -p -e "s/ICINGA_VERSION=.*/ICINGA_VERSION=$newversion/;" module/idoutils/db/oracle/oracle.sql





More information about the icinga-checkins mailing list