$local_sql .= " values ('parameter removed',3,'A parameter was removed') ";
$dbms->query($local_sql);
- case 20:
+ case 20:
$local_sql = "CREATE TABLE parameter_notification (notificationid bigint, paramid bigint, primary key (notificationid, paramid))";
$dbms->query($local_sql);
$dbms->query($local_sql);
- case 21:
+case 21:
$local_sql = "UPDATE action SET statuscode = LOWER(statuscode)";
$dbms->query($local_sql);
- case 22:
+case 22:
//Create a log_adv_kernel_network table that recognizes the log-records
//that have come from the kernel-network interface (typically iptables).
$local_sql = "CREATE TABLE log_adv_daemon (";
$local_sql .= ") INHERITS (log_adv)";
$dbms->query($local_sql);
- case 23:
+case 23:
$local_sql = "CREATE INDEX log_adv_daemon_service ON log_adv_daemon (service)";
$dbms->query($local_sql);
- case 24:
+case 24:
$local_sql = "ALTER TABLE object ADD COLUMN log_count BIGINT";
$dbms->query($local_sql);
case 29:
$local_sql = "INSERT INTO action (actionname, description) VALUES ('Redisplayed to user', "
. "'The notification has been presented to a user. This is not the first time')";
- echo $local_sql;
$dbms->query ($local_sql);
-/*
- //These columns have to be removed when a new version of PGSQL has become mainstream that supportsa DROP COLUMN
+case 30:
+ $local_sql = "INSERT INTO action (actionname, description) VALUES ('Displayed in list', "
+ . "'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);
+
+case 32:
+ $local_sql = "CREATE INDEX log_adv_daemon_email_s_ip ON log_adv_daemon_email (source_ip)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX log_adv_daemon_email_d_ip ON log_adv_daemon_email (destination_ip)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX log_adv_daemon_email_to ON log_adv_daemon_email (to_email)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX log_adv_daemon_email_from ON log_adv_daemon_email (from_email)";
+ $dbms->query($local_sql);
+
+
+case 33:
+ $local_sql = "ALTER TABLE log_adv_daemon_email ADD COLUMN size INT";
+ $dbms->query($local_sql);
+
+case 34:
+ $local_sql = "ALTER TABLE log_adv_daemon_email ADD COLUMN pri INT";
+ $dbms->query($local_sql);
+
+ $local_sql = "ALTER TABLE log_adv_daemon_email ADD COLUMN relay TEXT";
+ $dbms->query($local_sql);
+
+ $local_sql = "ALTER TABLE log_adv_daemon_email ADD COLUMN status_details TEXT";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX log_adv_email_status ON log_adv_daemon_email (status)";
+ $dbms->query($local_sql);
+
+case 35:
+ $local_sql = "ALTER TABLE log_adv_daemon_email ADD COLUMN dsn TEXT";
+ $dbms->query($local_sql);
+
+case 36:
+ //Create a notification check
+
+ $local_sql = "CREATE SEQUENCE checkid_seq";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE TABLE notification_check (";
+ $local_sql .= "checkid bigint DEFAULT nextval('checkid_seq'::text) NOT NULL,";
+ $local_sql .= "checkname TEXT, description TEXT, time_between_executions INTERVAL, ";
+ $local_sql .= "last_execution DATETIME, execution_counter BIGINT,";
+ $local_sql .= "notificationcounter BIGINT)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE UNIQUE INDEX not_check_checkid ON notification_check (checkid)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE UNIQUE INDEX not_check_checkname ON notification_check (checkname)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX not_check_check_lastexec ON notification_check (last_execution)";
+ $dbms->query($local_sql);
+
+case 37:
+ $local_sql = "ALTER TABLE notification_check ADD COLUMN decreasinglist BOOLEAN";
+ $dbms->query($local_sql);
+
+
+ $local_sql = "ALTER TABLE notification_check ADD COLUMN type_of_issueid BIGINT";
+ $dbms->query($local_sql);
+
+ $local_sql = "ALTER TABLE notification_check ALTER COLUMN decreasinglist SET DEFAULT 'FALSE'";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE SEQUENCE checklineid_seq";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE TABLE notification_check_line (";
+ $local_sql .= "checklineid BIGINT DEFAULT nextval('checklineid_seq'::text) NOT NULL,";
+ $local_sql .= "checkid BIGINT, sortorder INTEGER, last_logid BIGINT, ";
+ $local_sql .= "historicboundary INTERVAL, use_logid BOOLEAN, sql_query TEXT";
+ $local_sql .= ")";
+ $dbms->query($local_sql);
+
+ $local_sql = "ALTER TABLE notification_check_line ALTER COLUMN historicboundary SET DEFAULT '0'";
+ $dbms->query($local_sql);
+
+ $local_sql = "ALTER TABLE notification_check_line ALTER COLUMN use_logid SET DEFAULT 'FALSE'";
+ $dbms->query($local_sql);
+
+ $local_sql = "ALTER TABLE notification_check_line ALTER COLUMN last_logid SET DEFAULT '0'";
+ $dbms->query($local_sql);
+
+case 38:
+ $local_sql = "CREATE UNIQUE INDEX notcheckline_checklineid ON notification_check_line (checklineid)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX notcheckline_checkid ON notification_check_line (checkid)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX notcheckline_sort ON notification_check_line (sortorder)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX notcheckline_check_sort ON notification_check_line (checkid, sortorder)";
+ $dbms->query($local_sql);
+
+case 39:
+ $local_sql = "CREATE TABLE notification_check_buffer (";
+ $local_sql .= "checkid BIGINT, sortorder INTEGER, pid INTEGER, logid bigint";
+ $local_sql .= ")";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX notcheckbuffer_checkid ON notification_check_buffer(checkid)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX notcheckbuffer_sort ON notification_check_buffer(sortorder)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX notcheckbuffer_pid ON notification_check_buffer(pid)";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX notcheckbuffer_logid ON notification_check_buffer(logid)";
+ $dbms->query($local_sql);
+
+case 40:
+ $local_sql = "CREATE TABLE object_statistics (";
+ $local_sql .= "objectid bigint,";
+ $local_sql .= "statname text,";
+ $local_sql .= "statvalue double precision,";
+ $local_sql .= "primary key (objectid, statname)";
+ $local_sql .= ")";
+ $dbms->query($local_sql);
+
+ $local_sql = "CREATE INDEX obj_stat_objid ON object_statistics USING btree (objectid)";
+ $dbms->query($local_sql);
+
+case 41:
+ $local_sql = "CREATE INDEX history_pid_mod ON history(paramid, modified)";
+ $dbms->query($local_sql);
+
+//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);