[sr-dev] git:master: lib/srdb1/schema: added schema for mtrees table.

Juha Heinanen jh at tutpro.com
Sat Aug 20 07:22:46 CEST 2011


Module: sip-router
Branch: master
Commit: 8052c90610cf13a30d0a0b541bbc154669d117da
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8052c90610cf13a30d0a0b541bbc154669d117da

Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at tutpro.com>
Date:   Sat Aug 20 08:21:39 2011 +0300

lib/srdb1/schema: added schema for mtrees table.

---

 lib/srdb1/schema/kamailio-mtree.xml |    1 +
 lib/srdb1/schema/mtrees.xml         |   60 +++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/lib/srdb1/schema/kamailio-mtree.xml b/lib/srdb1/schema/kamailio-mtree.xml
index c10f26c..ec3de72 100644
--- a/lib/srdb1/schema/kamailio-mtree.xml
+++ b/lib/srdb1/schema/kamailio-mtree.xml
@@ -9,4 +9,5 @@
 <database xmlns:xi="http://www.w3.org/2001/XInclude">
     <name>MTree keys-values</name>
     <xi:include href="mtree.xml"/>
+    <xi:include href="mtrees.xml"/>
 </database>
diff --git a/lib/srdb1/schema/mtrees.xml b/lib/srdb1/schema/mtrees.xml
new file mode 100644
index 0000000..6a32055
--- /dev/null
+++ b/lib/srdb1/schema/mtrees.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//kamailio.org//DTD DBSchema V1.1//EN" 
+  "http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table id="mtree" xmlns:db="http://docbook.org/ns/docbook">
+    <name>mtree</name>
+    <version>1</version>
+    <type db="mysql">&MYSQL_TABLE_TYPE;</type>
+    <description>
+        <db:para>This table is used by the mtree module to load values in shared memory trees at start up. More information about the mtree module can be found at: &KAMAILIO_MOD_DOC;mtree.html
+        </db:para>
+    </description>
+
+    <column id="id">
+        <name>id</name>
+        <type>unsigned int</type>
+        <size>&table_id_len;</size>
+        <autoincrement/>
+        <primary/>
+        <type db="dbtext">int,auto</type>
+        <description>Unique ID</description>
+    </column>
+
+    <column id="tname">
+	<name>tname</name>
+        <type>string</type>
+        <size>128</size>
+        <default/>
+        <description>Name of shared memory tree.</description>
+    </column>
+
+    <column id="tprefix">
+	<name>tprefix</name>
+        <type>string</type>
+        <size>32</size>
+        <default/>
+        <description>Key to be used to index the values in the tree, usually a DID or prefix.</description>
+    </column>
+
+    <column id="tvalue">
+        <name>tvalue</name>
+        <type>string</type>
+        <size>128</size>
+        <default/>
+        <description>The value of the key</description>
+    </column>
+
+    <index>
+        <name>tname_tprefix_idx</name>
+        <colref linkend="tname"/>
+        <colref linkend="tprefix"/>
+        <unique/>
+    </index>
+
+</table>




More information about the sr-dev mailing list