Update of /cvsroot/tslogparser/tslogparser/db
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6286/db
Modified Files:
update_db.inc.php
Log Message:
Changes for TAHI support
Index: update_db.inc.php
===================================================================
RCS file: /cvsroot/tslogparser/tslogparser/db/update_db.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- update_db.inc.php 10 Jan 2005 18:09:54 -0000 1.1
+++ update_db.inc.php 14 Jun 2005 12:42:47 -0000 1.2
@@ -18,7 +18,7 @@
/* This file defines the function update_db() */
-define('LATEST_VERSION', "1");
+define('LATEST_VERSION', "2");
/* Example of update routine */
// function db_v1_to_v2()
@@ -30,13 +30,24 @@
// }
+function db_v1_to_v2()
+{
+ $queries=array();
+ $queries[]="ALTER TABLE `opts_run_results` CHANGE `res_log` `res_log` LONGTEXT DEFAULT NULL";
+ $queries[]="UPDATE opts_config SET cfg_val='2' WHERE cfg_key='version'";
+ execute_update_queries($queries);
+}
+
+
+
+
function update_db( $curver = 1 )
{
$tmpver = $curver;
/* This is the template for future database updates */
-// if ($tmpver == 1)
-// $tmpver = db_v1_to_v2();
+ if ($tmpver == 1)
+ $tmpver = db_v1_to_v2();
// if ($tmpver == 2)
// $tmpver = db_v2_to_v3();
// ...
|