/** * Function starts applying schema changes */ public static function initialize() { global $adb; $adb = PearDatabase::getInstance(); $adb->createTables("schema/DatabaseSchema.xml"); $defaultDataPopulator = new DefaultDataPopulator(); $defaultDataPopulator->create_tables(); self::createDefaultUsersAccess(); // create and populate combo tables $combo = new PopulateComboValues(); $combo->create_tables(); $combo->create_nonpicklist_tables(); create_tab_data_file(); create_parenttab_data_file(); // default report population vimport('~~modules/Reports/PopulateReports.php'); // default customview population vimport('~~modules/CustomView/PopulateCustomView.php'); // ensure required sequences are created (adodb creates them as needed, but if // creation occurs within a transaction we get problems $adb->getUniqueID("vtiger_crmentity"); $adb->getUniqueID("vtiger_seactivityrel"); $adb->getUniqueID("vtiger_freetags"); $currencyName = $_SESSION['config_file_info']['currency_name']; $currencyCode = $_SESSION['config_file_info']['currency_code']; $currencySymbol = $_SESSION['config_file_info']['currency_symbol']; $adb->pquery("INSERT INTO vtiger_currency_info VALUES (?,?,?,?,?,?,?,?)", array($adb->getUniqueID("vtiger_currency_info"), $currencyName, $currencyCode, $currencySymbol, 1, 'Active', '-11', '0')); Install_InitSchema_Model::installDefaultEventsAndWorkflows(); }
} // TODO HTML if ($success == 0) { die("Error: Tables not created. Table creation failed.\n"); } elseif ($success == 1) { die("Error: Tables partially created. Table creation failed.\n"); } foreach ($modules as $module) { $focus = new $module(); $focus->create_tables(); } create_default_users_access(); // create and populate combo tables require_once 'include/PopulateComboValues.php'; $combo = new PopulateComboValues(); $combo->create_tables(); $combo->create_nonpicklist_tables(); //Writing tab data in flat file create_tab_data_file(); create_parenttab_data_file(); // default report population require_once 'modules/Reports/PopulateReports.php'; // default customview population require_once 'modules/CustomView/PopulateCustomView.php'; // ensure required sequences are created (adodb creates them as needed, but if // creation occurs within a transaction we get problems $adb->getUniqueID("vtiger_crmentity"); $adb->getUniqueID("vtiger_seactivityrel"); $adb->getUniqueID("vtiger_freetags"); //Master currency population //Insert into vtiger_currency vtiger_table