Module: sip-router
Branch: 4.0
Commit: 120b736c14b3dae780cfc9ef7fc8fd1c79d32d92
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=120b736…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 10 14:14:52 2013 +0200
kamdbctl: added missing dbuid tables group creation
- patch by elactrum [at]
jamailca.com
(cherry picked from commit 6f17209a70e84d91976ea42b476ae248b9b37501)
---
utils/kamctl/kamdbctl.pgsql | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/utils/kamctl/kamdbctl.pgsql b/utils/kamctl/kamdbctl.pgsql
index 4a0fe7a..ae39f62 100644
--- a/utils/kamctl/kamdbctl.pgsql
+++ b/utils/kamctl/kamdbctl.pgsql
@@ -246,3 +246,24 @@ done
minfo "Extra tables succesfully created."
} # end extra_create
+
+
+dbuid_create () # pars: <database name>
+{
+ if [ $# -ne 1 ] ; then
+ merr "dbuid_create function takes one param"
+ exit 1
+ fi
+
+ minfo "creating uid tables into $1 ..."
+
+ for TABLE in $DBUID_MODULES; do
+ mdbg "Creating uid table: $TABLE"
+ sql_query $1 < $DB_SCHEMA/$TABLE-create.sql
+ if [ $? -ne 0 ] ; then
+ merr "Creating uid tables failed at $TABLE!"
+ exit 1
+ fi
+ done
+ minfo "UID tables succesfully created."
+} # end uid_create