Added new tables to the database: parameter_class and parameter_notification
[gnucomo.git] / src / gcm_daemon / classes / gnucomo_db_version.php
index 22385b4..fdf2ad4 100644 (file)
       $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";