Browse Source

srdb1/kamctl: dialog_vars table added to dialog group

- dialog_vars is used by dialog module and created at once with dialog
  table, otherwise the module does not start
Daniel-Constantin Mierla 14 years ago
parent
commit
dbb012c32e

+ 1 - 0
lib/srdb1/schema/kamailio-dialog.xml

@@ -9,4 +9,5 @@
 <database xmlns:xi="http://www.w3.org/2001/XInclude">
     <name>Dialog support</name>
     <xi:include href="dialog.xml"/>
+    <xi:include href="dialog_vars.xml"/>
 </database>

+ 0 - 12
lib/srdb1/schema/kamailio-dialog_vars.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE database 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;
-]>
-
-<database xmlns:xi="http://www.w3.org/2001/XInclude">
-    <name>Dialog Variables support</name>
-    <xi:include href="dialog_vars.xml"/>
-</database>

+ 0 - 2
utils/kamctl/db_berkeley/kamailio/mtrees

@@ -8,5 +8,3 @@ METADATA_LOGFLAGS
 0
 METADATA_DEFAULTS
 NIL|''|''|''
-mtrees|
-mtrees|1

+ 4 - 2
utils/kamctl/db_berkeley/kamailio/version

@@ -28,8 +28,8 @@ dbaliases|
 dbaliases|1
 dialog|
 dialog|5
-METADATA_DEFAULTS
-NIL|NIL|NIL|NIL|NIL
+dialog_vars|
+dialog_vars|1
 dialplan|
 dialplan|1
 dispatcher|
@@ -72,6 +72,8 @@ missed_calls|
 missed_calls|3
 mtree|
 mtree|1
+mtrees|
+mtrees|1
 pdt|
 pdt|1
 pl_pipes|

+ 11 - 0
utils/kamctl/db_sqlite/dialog-create.sql

@@ -27,3 +27,14 @@ CREATE TABLE dialog (
 
 CREATE INDEX dialog_hash_idx ON dialog (hash_entry, hash_id);
 
+INSERT INTO version (table_name, table_version) values ('dialog_vars','1');
+CREATE TABLE dialog_vars (
+    id INTEGER PRIMARY KEY NOT NULL,
+    hash_entry INTEGER NOT NULL,
+    hash_id INTEGER NOT NULL,
+    dialog_key VARCHAR(128) NOT NULL,
+    dialog_value VARCHAR(512) NOT NULL
+);
+
+CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id);
+

+ 0 - 11
utils/kamctl/db_sqlite/dialog_vars-create.sql

@@ -1,11 +0,0 @@
-INSERT INTO version (table_name, table_version) values ('dialog_vars','1');
-CREATE TABLE dialog_vars (
-    id INTEGER PRIMARY KEY NOT NULL,
-    hash_entry INTEGER NOT NULL,
-    hash_id INTEGER NOT NULL,
-    dialog_key VARCHAR(128) NOT NULL,
-    dialog_value VARCHAR(512) NOT NULL
-) ENGINE=MyISAM;
-
-CREATE INDEX hash_idx ON dialog_vars (hash_entry, hash_id);
-

+ 1 - 1
utils/kamctl/dbtext/kamailio/dialog_vars

@@ -1 +1 @@
-id(int,auto) hash_entry(int) hash_id(int) dialog_key(string) dialog_value(string)
+id(int,auto) hash_entry(int) hash_id(int) dialog_key(string) dialog_value(string) 

+ 0 - 1
utils/kamctl/dbtext/kamailio/mtrees

@@ -1,2 +1 @@
 id(int,auto) tname(string) tprefix(string) tvalue(string) 
-mtrees:1

+ 2 - 1
utils/kamctl/dbtext/kamailio/version

@@ -9,7 +9,7 @@ carrierroute:3
 cpl:1
 dbaliases:1
 dialog:5
-id(int,auto) hash_entry(int) hash_id(int) dialog_key(string) dialog_value(string)
+dialog_vars:1
 dialplan:1
 dispatcher:4
 domain:1
@@ -31,6 +31,7 @@ location:1004
 matrix:1
 missed_calls:3
 mtree:1
+mtrees:1
 pdt:1
 pl_pipes:1
 presentity:3

+ 1 - 1
utils/kamctl/kamdbctl.base

@@ -35,7 +35,7 @@ INSTALL_PRESENCE_TABLES=${INSTALL_PRESENCE_TABLES:-ask}
 STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases domain grp
 		uri speed_dial lcr_gw lcr_rule lcr_rule_target pdt subscriber
 		location re_grp trusted address missed_calls usr_preferences
-		aliases silo dialog dispatcher dialplan}
+		aliases silo dialog dialog_vars dispatcher dialplan}
 EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy
 		carrierroute carrier_name domain_name carrierfailureroute userblacklist
 		globalblacklist htable purplemap uacreg pl_pipes}

+ 11 - 0
utils/kamctl/mysql/dialog-create.sql

@@ -27,3 +27,14 @@ CREATE TABLE dialog (
 
 CREATE INDEX hash_idx ON dialog (hash_entry, hash_id);
 
+INSERT INTO version (table_name, table_version) values ('dialog_vars','1');
+CREATE TABLE dialog_vars (
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+    hash_entry INT(10) UNSIGNED NOT NULL,
+    hash_id INT(10) UNSIGNED NOT NULL,
+    dialog_key VARCHAR(128) NOT NULL,
+    dialog_value VARCHAR(512) NOT NULL
+) ENGINE=MyISAM;
+
+CREATE INDEX hash_idx ON dialog_vars (hash_entry, hash_id);
+

+ 0 - 11
utils/kamctl/mysql/dialog_vars-create.sql

@@ -1,11 +0,0 @@
-INSERT INTO version (table_name, table_version) values ('dialog_vars','1');
-CREATE TABLE dialog_vars (
-    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
-    hash_entry INT(10) UNSIGNED NOT NULL,
-    hash_id INT(10) UNSIGNED NOT NULL,
-    dialog_key VARCHAR(128) NOT NULL,
-    dialog_value VARCHAR(512) NOT NULL
-) ENGINE=MyISAM;
-
-CREATE INDEX hash_idx ON dialog_vars (hash_entry, hash_id);
-

+ 19 - 0
utils/kamctl/oracle/dialog-create.sql

@@ -35,3 +35,22 @@ BEGIN map2users('dialog'); END;
 /
 CREATE INDEX dialog_hash_idx  ON dialog (hash_entry, hash_id);
 
+INSERT INTO version (table_name, table_version) values ('dialog_vars','1');
+CREATE TABLE dialog_vars (
+    id NUMBER(10) PRIMARY KEY,
+    hash_entry NUMBER(10),
+    hash_id NUMBER(10),
+    dialog_key VARCHAR2(128),
+    dialog_value VARCHAR2(512)
+);
+
+CREATE OR REPLACE TRIGGER dialog_vars_tr
+before insert on dialog_vars FOR EACH ROW
+BEGIN
+  auto_id(:NEW.id);
+END dialog_vars_tr;
+/
+BEGIN map2users('dialog_vars'); END;
+/
+CREATE INDEX dialog_vars_hash_idx  ON dialog_vars (hash_entry, hash_id);
+

+ 0 - 19
utils/kamctl/oracle/dialog_vars-create.sql

@@ -1,19 +0,0 @@
-INSERT INTO version (table_name, table_version) values ('dialog_vars','1');
-CREATE TABLE dialog_vars (
-    id NUMBER(10) PRIMARY KEY,
-    hash_entry NUMBER(10),
-    hash_id NUMBER(10),
-    dialog_key VARCHAR2(128),
-    dialog_value VARCHAR2(512)
-);
-
-CREATE OR REPLACE TRIGGER dialog_vars_tr
-before insert on dialog_vars FOR EACH ROW
-BEGIN
-  auto_id(:NEW.id);
-END dialog_vars_tr;
-/
-BEGIN map2users('dialog_vars'); END;
-/
-CREATE INDEX dialog_vars_hash_idx  ON dialog_vars (hash_entry, hash_id);
-

+ 11 - 0
utils/kamctl/postgres/dialog-create.sql

@@ -27,3 +27,14 @@ CREATE TABLE dialog (
 
 CREATE INDEX dialog_hash_idx ON dialog (hash_entry, hash_id);
 
+INSERT INTO version (table_name, table_version) values ('dialog_vars','1');
+CREATE TABLE dialog_vars (
+    id SERIAL PRIMARY KEY NOT NULL,
+    hash_entry INTEGER NOT NULL,
+    hash_id INTEGER NOT NULL,
+    dialog_key VARCHAR(128) NOT NULL,
+    dialog_value VARCHAR(512) NOT NULL
+);
+
+CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id);
+

+ 0 - 11
utils/kamctl/postgres/dialog_vars-create.sql

@@ -1,11 +0,0 @@
-INSERT INTO version (table_name, table_version) values ('dialog_vars','1');
-CREATE TABLE dialog_vars (
-    id SERIAL PRIMARY KEY NOT NULL,
-    hash_entry INTEGER NOT NULL,
-    hash_id INTEGER NOT NULL,
-    dialog_key VARCHAR(128) NOT NULL,
-    dialog_value VARCHAR(512)
-);
-
-CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id);
-