Browse code

kamdbctl: added missing dbuid tables group creation

- patch by elactrum [at] jamailca.com

Daniel-Constantin Mierla authored on 10/09/2013 12:14:52
Showing 1 changed files
... ...
@@ -246,3 +246,24 @@ done
246 246
 
247 247
 minfo "Extra tables succesfully created."
248 248
 }  # end extra_create
249
+
250
+
251
+dbuid_create () # pars: <database name>
252
+{
253
+	if [ $# -ne 1 ] ; then
254
+		merr "dbuid_create function takes one param"
255
+		exit 1
256
+	fi
257
+
258
+	minfo "creating uid tables into $1 ..."
259
+
260
+	for TABLE in $DBUID_MODULES; do
261
+		mdbg "Creating uid table: $TABLE"
262
+		sql_query $1 < $DB_SCHEMA/$TABLE-create.sql
263
+		if [ $? -ne 0 ] ; then
264
+			merr "Creating uid tables failed at $TABLE!"
265
+			exit 1
266
+			fi
267
+		done
268
+	minfo "UID tables succesfully created."
269
+}  # end uid_create