[sr-dev] git:master: lib/srdb1: added location_attrs table
Daniel-Constantin Mierla
miconda at gmail.com
Fri Dec 28 22:26:30 CET 2012
Module: sip-router
Branch: master
Commit: 060734a2acf96333ffaef8207812cc27bc127c76
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=060734a2acf96333ffaef8207812cc27bc127c76
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Fri Dec 28 14:55:35 2012 +0100
lib/srdb1: added location_attrs table
- store per contact attributes
---
lib/srdb1/schema/kamailio-usrloc.xml | 1 +
lib/srdb1/schema/location_attrs.xml | 101 ++++++++++++++++++++++++++++++++++
2 files changed, 102 insertions(+), 0 deletions(-)
diff --git a/lib/srdb1/schema/kamailio-usrloc.xml b/lib/srdb1/schema/kamailio-usrloc.xml
index f0fb41d..a86418f 100644
--- a/lib/srdb1/schema/kamailio-usrloc.xml
+++ b/lib/srdb1/schema/kamailio-usrloc.xml
@@ -9,4 +9,5 @@
<database xmlns:xi="http://www.w3.org/2001/XInclude">
<name>User location</name>
<xi:include href="location.xml"/>
+ <xi:include href="location_attrs.xml"/>
</database>
diff --git a/lib/srdb1/schema/location_attrs.xml b/lib/srdb1/schema/location_attrs.xml
new file mode 100644
index 0000000..491fce2
--- /dev/null
+++ b/lib/srdb1/schema/location_attrs.xml
@@ -0,0 +1,101 @@
+<?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="location" xmlns:db="http://docbook.org/ns/docbook">
+ <name>location_attrs</name>
+ <version>1</version>
+ <type db="mysql">&MYSQL_TABLE_TYPE;</type>
+ <description>
+ <db:para>Persistent user location attributes for the usrloc module. More information can be found at: &KAMAILIO_MOD_DOC;usrloc.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="ruid">
+ <name>ruid</name>
+ <type>string</type>
+ <size>64</size>
+ <default/>
+ <description>Record internal unique id</description>
+ <natural/>
+ </column>
+
+ <column id="username">
+ <name>&USERCOL;</name>
+ <type>string</type>
+ <size>&user_len;</size>
+ <default/>
+ <description>Username / phone number </description>
+ <natural/>
+ </column>
+
+ <column id="domain">
+ <name>domain</name>
+ <type>string</type>
+ <size>&domain_len;</size>
+ <null/>
+ <default><null/></default>
+ <description>Domain name</description>
+ <natural/>
+ </column>
+
+ <column>
+ <name>aname</name>
+ <type>string</type>
+ <size>64</size>
+ <default/>
+ <description>Attribute name.</description>
+ </column>
+
+ <column>
+ <name>atype</name>
+ <type>int</type>
+ <size>11</size>
+ <default>0</default>
+ <description>Attribute type.</description>
+ </column>
+
+ <column>
+ <name>avalue</name>
+ <type>string</type>
+ <size>255</size>
+ <default/>
+ <description>Attribute value.</description>
+ </column>
+
+ <column id="last_modified">
+ <name>last_modified</name>
+ <type>datetime</type>
+ <default>&DEFAULT_DATETIME;</default>
+ <default db="oracle">to_date('&DEFAULT_DATETIME;','yyyy-mm-dd hh24:mi:ss')</default>
+ <description>Date and time when this entry was last modified.</description>
+ </column>
+
+ <index>
+ <name>account_record_idx</name>
+ <colref linkend="username"/>
+ <colref linkend="domain"/>
+ <colref linkend="ruid"/>
+ </index>
+ <index>
+ <name>last_modified_idx</name>
+ <colref linkend="last_modified"/>
+ </index>
+
+
+</table>
More information about the sr-dev
mailing list