[icinga-checkins] icinga.org: icinga-reports/mluebben/default: Change fieldname in table reports from rptimeperiod to timeperiod

git at icinga.org git at icinga.org
Wed Apr 27 13:48:51 CEST 2011


Module: icinga-reports
Branch: mluebben/default
Commit: 0b943c5bb7695ee4ff1806094bbaf66a550d6069
URL:    https://git.icinga.org/?p=icinga-reports.git;a=commit;h=0b943c5bb7695ee4ff1806094bbaf66a550d6069

Author: Michael Luebben <michael_luebben at web.de>
Date:   Wed Apr 27 13:48:34 2011 +0200

Change fieldname in table reports from rptimeperiod to timeperiod

---

 AvailReportParser/Modules/Reporting/DBHandler.pm   |    6 +++---
 AvailReportParser/db/mysql/mysql.sql               |    3 +--
 AvailReportParser/doc/database/Database-Schema.pdf |  Bin 72626 -> 72625 bytes
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/AvailReportParser/Modules/Reporting/DBHandler.pm b/AvailReportParser/Modules/Reporting/DBHandler.pm
index bbf3d95..c6ce34b 100755
--- a/AvailReportParser/Modules/Reporting/DBHandler.pm
+++ b/AvailReportParser/Modules/Reporting/DBHandler.pm
@@ -18,7 +18,7 @@ DBHandler.pm
 
 =head1 Version
 
-Version 0.0.4
+Version 0.0.5
 
 =head1 DESCRIPTION
 
@@ -134,13 +134,13 @@ sub createNewReport {
 	my $self = shift;
 	my $hostname = shift;
 	my $service_description = shift;
-	my $rptimeperiod = shift;
+	my $timeperiod = shift;
 	my $config_filename = shift;
 	
 	my $sth;
 	my $insertID;
 		
-	$sth = $self->{dbh}->prepare("INSERT INTO reports (date, hostname, service_description, rptimeperiod, config_filename) VALUES (now(), '".$hostname."', '".$service_description."', '".$rptimeperiod."', '".$config_filename."')");
+	$sth = $self->{dbh}->prepare("INSERT INTO reports (date, hostname, service_description, timeperiod, config_filename) VALUES (now(), '".$hostname."', '".$service_description."', '".$timeperiod."', '".$config_filename."')");
 	$sth->execute();
 	$insertID = $self->{dbh}->{ q{mysql_insertid} };
 	$sth->finish;
diff --git a/AvailReportParser/db/mysql/mysql.sql b/AvailReportParser/db/mysql/mysql.sql
index 623e82c..9949f46 100644
--- a/AvailReportParser/db/mysql/mysql.sql
+++ b/AvailReportParser/db/mysql/mysql.sql
@@ -52,7 +52,7 @@ CREATE  TABLE IF NOT EXISTS `report`.`reports` (
   `date` DATETIME NOT NULL ,
   `hostname` VARCHAR(45) NOT NULL ,
   `service_description` VARCHAR(45) NULL ,
-  `rptimeperiod` VARCHAR(45) NOT NULL ,
+  `timeperiod` VARCHAR(45) NOT NULL ,
   `config_filename` VARCHAR(45) NOT NULL ,
   PRIMARY KEY (`id`) )
 ENGINE = InnoDB;
@@ -249,4 +249,3 @@ INSERT INTO `report`.`statetypes` (`id`, `name`) VALUES (2, 'start');
 INSERT INTO `report`.`statetypes` (`id`, `name`) VALUES (3, 'end');
 
 COMMIT;
-
diff --git a/AvailReportParser/doc/database/Database-Schema.pdf b/AvailReportParser/doc/database/Database-Schema.pdf
index 6d9fb3f..9399710 100644
Binary files a/AvailReportParser/doc/database/Database-Schema.pdf and b/AvailReportParser/doc/database/Database-Schema.pdf differ





More information about the icinga-checkins mailing list