Added table "script_library"
authorVictor Kirhenshtein <victor@netxms.org>
Fri, 6 Jan 2006 17:25:51 +0000 (17:25 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Fri, 6 Jan 2006 17:25:51 +0000 (17:25 +0000)
.gitattributes
doc/db_format_change.txt
include/netxmsdb.h
sql/dbinit.in
sql/schema.in
sql/scripts.in [new file with mode: 0644]
sql/traps.in

index ade9d29..1cc0097 100644 (file)
@@ -190,6 +190,7 @@ sql/images.in -text
 sql/objtools.in -text
 sql/policy.in -text
 sql/schema.in -text
+sql/scripts.in -text
 sql/setup.in -text
 sql/traps.in -text
 src/Makefile.am -text
index 0c44712..609110a 100644 (file)
@@ -1,4 +1,18 @@
 *************
+* 36 ==> 37 *
+*************
+
+- Added table "script_library":
+       CREATE TABLE script_library
+       (
+               script_id integer not null,
+               script_name varchar(63) not null,
+               script_code SQL_TEXT not null,
+               PRIMARY KEY(script_id)
+       ) TABLE_TYPE;
+
+
+*************
 * 35 ==> 36 *
 *************
 
index 643a69a..1e1db7d 100644 (file)
@@ -23,6 +23,6 @@
 #ifndef _netxms_db_h
 #define _netxms_db_h
 
-#define DB_FORMAT_VERSION      36
+#define DB_FORMAT_VERSION      37
 
 #endif
index bbaff4e..e3ee4d3 100644 (file)
@@ -80,6 +80,7 @@ BEGIN TRANSACTION;
 #include "policy.in"
 #include "traps.in"
 #include "objtools.in"
+#include "scripts.in"
 
 // End transaction
 #if defined(DB_POSTGRESQL) || defined(DB_SQLITE)
index 61309bd..81b84d4 100644 (file)
@@ -756,6 +756,19 @@ CREATE TABLE syslog
 
 
 /*
+** Script library
+*/
+
+CREATE TABLE script_library
+(
+       script_id integer not null,
+       script_name varchar(63) not null,
+       script_code SQL_TEXT not null,
+       PRIMARY KEY(script_id)
+) TABLE_TYPE;
+
+
+/*
 ** Log processing policy
 */
 
diff --git a/sql/scripts.in b/sql/scripts.in
new file mode 100644 (file)
index 0000000..dc00a08
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+** Default scripts
+**
+** ex: syntax=sql
+*/
+
+INSERT INTO script_library (script_id,script_name,script_code)
+       VALUES (1,'Filter::SNMP','sub main()#0D#0A{#0D#0A   return 1;#0D#0A}#0D#0A');
index 56ce06a..3810f7a 100644 (file)
@@ -1,5 +1,7 @@
 /*
 ** Default SNMP trap handling
+**
+** ex: syntax=sql
 */
 
 INSERT INTO snmp_trap_cfg (trap_id,snmp_oid,event_code,description)