From: arjen Date: Fri, 21 Feb 2003 08:37:40 +0000 (+0000) Subject: Added new table to the database: log_adv_daemon_email. X-Git-Tag: V0_0_5~11 X-Git-Url: http://www.andromeda.nl/gitweb/?p=gnucomo.git;a=commitdiff_plain;h=488abe089477c008701aefe7b35d8c50142db1c5 Added new table to the database: log_adv_daemon_email. --- diff --git a/src/database/create.sql b/src/database/create.sql index 219abe0..21d0ef6 100644 --- a/src/database/create.sql +++ b/src/database/create.sql @@ -12,7 +12,10 @@ -- DBA create the database and give access permissions. -- -- $Log: create.sql,v $ --- Revision 1.11 2003-02-16 08:24:38 arjen +-- Revision 1.12 2003-02-21 08:38:38 arjen +-- Added new table to the database: log_adv_daemon_email. +-- +-- Revision 1.11 2003/02/16 08:24:38 arjen -- Added a new entry to the action table: Notification was displayed in the listing -- -- Revision 1.10 2003/02/14 06:32:27 arjen @@ -128,7 +131,7 @@ CREATE TABLE "db_value" COPY "db_value" FROM stdin; -db_version 31 +db_version 32 gcm_daemon_version 1 log_processing 0 last_notification 0 @@ -237,11 +240,26 @@ CREATE TABLE log_adv_kernel_network CREATE TABLE log_adv_daemon ( service TEXT, - event TEXT + event TEXT ) INHERITS (log_adv); CREATE INDEX log_adv_daemon_service ON log_adv_daemon (service); +CREATE TABLE log_adv_daemon_email +( + source_ip INET, + destination_ip INET, + internal_messageid TEXT, + external_messageid TEXT, + to_email TEXT, + from_email TEXT, + delay TIME, + xdelay TIME, + mailer TEXT, + status TEXT, + pid INT +) INHERITS (log_adv_daemon); + /* CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER "plpgsql_call_handler" LANCOMPILER ''; CREATE FUNCTION "funct_processlog" () RETURNS opaque AS ' diff --git a/src/database/destroy.sql b/src/database/destroy.sql index 550217d..f69b1ed 100644 --- a/src/database/destroy.sql +++ b/src/database/destroy.sql @@ -32,6 +32,7 @@ DROP TABLE "log"; DROP SEQUENCE "log_advid_seq"; DROP TABLE log_adv_kernel_network; +DROP TABLE log_adv_daemon_email; DROP TABLE log_adv_daemon; DROP TABLE "log_adv"; diff --git a/src/gcm_daemon/classes/gnucomo_db_version.php b/src/gcm_daemon/classes/gnucomo_db_version.php index a32e8ed..9908b81 100644 --- a/src/gcm_daemon/classes/gnucomo_db_version.php +++ b/src/gcm_daemon/classes/gnucomo_db_version.php @@ -287,10 +287,17 @@ case 30: . "'The notification has been presented in a list with other notifications.')"; $dbms->query ($local_sql); - +case 31: + $local_sql = "CREATE TABLE log_adv_daemon_email ("; + $local_sql .= "source_ip INET, destination_ip INET, internal_messageid TEXT, "; + $local_sql .= "external_messageid TEXT, to_email TEXT, from_email TEXT, delay TIME, xdelay TIME, "; + $local_sql .= "mailer TEXT, status TEXT, pid INT"; + $local_sql .= ") INHERITS (log_adv_daemon)"; + $dbms->query($local_sql); -/* - //These columns have to be removed when a new version of PGSQL has become mainstream that supportsa DROP COLUMN +//These columns have to be removed when a new version of PGSQL has become mainstream that supportsa DROP COLUMN +/* + $local_sql = "ALTER TABLE log DROP COLUMN recognized"; $dbms->query($local_sql); diff --git a/src/gcm_daemon/gcm_daemon.php b/src/gcm_daemon/gcm_daemon.php index 3be6fe2..1ed9bc9 100755 --- a/src/gcm_daemon/gcm_daemon.php +++ b/src/gcm_daemon/gcm_daemon.php @@ -18,9 +18,14 @@ First : November 8th 2002 Gnucomo-0.0.3: December 6th 2002 + $Log: gcm_daemon.php,v $ + Revision 1.9 2003-02-21 08:37:59 arjen + Added new table to the database: log_adv_daemon_email. + + */ -// $Id: gcm_daemon.php,v 1.8 2003-02-16 08:24:06 arjen Exp $ +// $Id: gcm_daemon.php,v 1.9 2003-02-21 08:37:59 arjen Exp $ ini_set('include_path', '.:./classes:../phpclasses'); @@ -37,7 +42,7 @@ require_once "gnucomo.process_log.php"; $project_name = "gnucomo"; //name of the entire project $app_name = "gcm_daemon"; //name of the application running $developrelease = "TRUE"; //Indicates if special debug settings are needed -$db_version = 31; //The db_version indicates what the level of +$db_version = 32; //The db_version indicates what the level of //the database should be. If the database is //old an update will be generated. $gcmd_version = 3; //This value indicates the active version of the gcm_daemon,