<tr align="left" valign="top"> <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="1"> <tr align="left" valign="top"> <td class="pad" id="content" colspan="2"> <?php // ----------------------------------------------------------------------------------- $db_cfg['source'] = array('db_type' => 'mysql', 'db_server' => $_SESSION['databasehost'], 'db_name' => $_SESSION['source_databasename'], 'db_admin_name' => $_SESSION['databaseloginname'], 'db_admin_pass' => $_SESSION['databaseloginpassword']); $db_cfg['target'] = array('db_type' => 'mysql', 'db_server' => $_SESSION['databasehost'], 'db_name' => $_SESSION['target_databasename'], 'db_admin_name' => $_SESSION['databaseloginname'], 'db_admin_pass' => $_SESSION['databaseloginpassword']); // SOURCE DB echo '<span>Connecting to Testlink 1.6 (source) database. - ' . $db_cfg['source']['db_name'] . ' - </span>'; $source_db = connect_2_db($db_cfg['source']); // TARGET DB echo '<span>Connecting to Testlink 1.7 (target) database. - ' . $db_cfg['target']['db_name'] . ' - </span>'; $target_db = connect_2_db($db_cfg['target']); // make sure we have a connection to both dbs if (is_null($source_db) || is_null($target_db)) { echo "<p>FATAL ERROR: Could not connect to either source or target db!</p>"; exit; } // ----------------------------------------------------------------------------------- $tproject_mgr = new testproject($target_db); $ts_mgr = new testsuite($target_db); $tc_mgr = new testcase($target_db); $tree_mgr = new tree($target_db); $assignment_mgr = new assignment_mgr($target_db); $assignment_types = $assignment_mgr->get_available_types(); $assignment_status = $assignment_mgr->get_available_status(); define('EMPTY_NOTES', ''); // all the tables that will be truncated in the 1.7 db
</span></td> </tr> <tr class="fancyRow2"> <td colspan="2" class="border-top-bottom smallText" align="right"> </td> </tr> <tr align="left" valign="top"> <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="1"> <tr align="left" valign="top"> <td class="pad" id="content" colspan="2"> <?php // ----------------------------------------------------------------------------------- $db_cfg['source'] = array('db_type' => $_SESSION['databasetype'], 'db_server' => $_SESSION['databasehost'], 'db_name' => $_SESSION['source_databasename'], 'db_admin_name' => $_SESSION['databaseloginname'], 'db_admin_pass' => $_SESSION['databaseloginpassword'], 'log_level' => 'NONE'); echo '<span>Connecting to Testlink 1.7.2 (source) database. - ' . $db_cfg['source']['db_name'] . ' - </span>'; $source_db = connect_2_db($db_cfg['source']); // make sure we have a connection to both dbs if (is_null($source_db)) { echo "<p>FATAL ERROR: Could not connect to source db!</p>"; exit; } // ----------------------------------------------------------------------------------- $tree_mgr = new tree($source_db); $tproject_mgr = new testproject($source_db); define('EMPTY_NOTES', ''); $a_sql = array(); // ------------------------------------------------------------------------------- // Give warning to user if version of source db is not ok to be migrated $my_ado = $source_db->get_dbmgr_object(); $the_version_table = $my_ado->MetaTables('TABLES', false, 'db_version'); $do_it = 0;