From: arjen Date: Mon, 20 Jan 2003 07:29:48 +0000 (+0000) Subject: Added new tables to the database: parameter_class and parameter_notification X-Git-Tag: V0_0_4~15 X-Git-Url: http://www.andromeda.nl/gitweb/?p=gnucomo.git;a=commitdiff_plain;h=5a88d243536439034a10be4cbd913e50dbefe5bd Added new tables to the database: parameter_class and parameter_notification --- diff --git a/src/database/create.sql b/src/database/create.sql index dc66c84..992f656 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.5 2003-01-18 08:46:48 arjen +-- Revision 1.6 2003-01-20 07:29:48 arjen +-- Added new tables to the database: parameter_class and parameter_notification +-- +-- Revision 1.5 2003/01/18 08:46:48 arjen -- Added new records to the 'type_of_issue' table. -- Changed semantics of actionid 9 in the 'action' table. -- @@ -103,7 +106,7 @@ CREATE TABLE "db_value" COPY "db_value" FROM stdin; -db_version 20 +db_version 21 gcm_daemon_version 1 log_processing 0 \. @@ -428,6 +431,36 @@ SELECT setval ('"paramid_seq"', 1, true); -- -- +CREATE TABLE "parameter_class" +( + "name" text, -- Name of the class: see parameter.class + "property_name" text, + "description" text, + "property_type" text, -- STATIC or DYNAMIC + "min" float, -- Default minimum value + "max" float, -- Default maximum value + "notify" boolean, -- Notify if something changes ? + + primary key (name, property_name) +); + +INSERT INTO parameter_class (name, property_name, description, property_type, notify) + VALUES ('package', 'version', 'The installed version of the package', 'STATIC', 't'); + +-- +-- + +CREATE TABLE "parameter_notification" +( + "notificationid" bigint, + "paramid" bigint, + + primary key (notificationid, paramid) +); + +-- +-- + CREATE TABLE "priority" ( "priority" integer, diff --git a/src/database/destroy.sql b/src/database/destroy.sql index 5820798..e729675 100644 --- a/src/database/destroy.sql +++ b/src/database/destroy.sql @@ -58,6 +58,10 @@ DROP SEQUENCE "paramid_seq"; DROP TABLE "parameter"; +DROP TABLE "parameter_class"; + +DROP TABLE "parameter_notification"; + DROP TABLE "priority"; DROP TABLE "property"; diff --git a/src/gcm_daemon/classes/gnucomo_db_version.php b/src/gcm_daemon/classes/gnucomo_db_version.php index 22385b4..fdf2ad4 100644 --- a/src/gcm_daemon/classes/gnucomo_db_version.php +++ b/src/gcm_daemon/classes/gnucomo_db_version.php @@ -184,6 +184,19 @@ $local_sql .= " values ('parameter removed',3,'A parameter was removed') "; $dbms->query($local_sql); + case 20: + $local_sql = "CREATE TABLE 'parameter_notification' ('notificationid' bigint, 'paramid' bigint, primary key (notificationid, paramid))"; + $dbms->query($local_sql); + + $local_sql = "CREATE TABLE 'parameter_class' ('name' text, 'property_name' text, 'description' text, 'property_type' text, "; + $local_sql .= "'min' float, 'max' float, 'notify' boolean, primary key (name, property_name));"; + $dbms->query($local_sql); + + $local_sql = "INSERT INTO parameter_class (name, property_name, description, property_type, notify)"; + $local_sql .= "VALUES ('package', 'version', 'The installed version of the package', 'STATIC', 't')"; + $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"; diff --git a/src/gcm_daemon/gcm_daemon.php b/src/gcm_daemon/gcm_daemon.php index 5112e53..e5ea247 100755 --- a/src/gcm_daemon/gcm_daemon.php +++ b/src/gcm_daemon/gcm_daemon.php @@ -32,7 +32,7 @@ require_once "classes/gnucomo.process_log.php"; $project_name = "gnucomo"; //name of the entire project $app_name = "gcm_daemon"; //name of the application running $developrelease = "FALSE"; //Indicates if special debug settings are needed -$db_version = 20; //The db_version indicates what the level of +$db_version = 21; //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,