* [misc] fix convert charset on upgrade not work.
This commit is contained in:
@@ -108,9 +108,10 @@ $config->upgrade->execFlow['20_8'] = array('functions' => 'processWorkflo
|
||||
$config->upgrade->execFlow['21_1'] = array('functions' => 'processCacheConfig');
|
||||
$config->upgrade->execFlow['21_2'] = array('functions' => 'importBuildinWorkflow,addCharterApprovalFlow,processCharterFileConfig,processCharterStatus', 'params' => array('importBuildinWorkflow' => array('rnd', 'charter')));
|
||||
$config->upgrade->execFlow['21_3'] = array('functions' => 'createDevOpsChartModule');
|
||||
$config->upgrade->execFlow['21_6_beta'] = array('functions' => 'convertCharset,processCharterBranch');
|
||||
$config->upgrade->execFlow['21_6_beta'] = array('functions' => 'processCharterBranch');
|
||||
$config->upgrade->execFlow['21_6_1'] = array('xxsqls' => "$appRoot/db/upgradexuanxuan9.1.2.sql");
|
||||
$config->upgrade->execFlow['21_7'] = array('functions' => 'fixWorkflowNameForExecution');
|
||||
$config->upgrade->execFlow['21_7_1'] = array('functions' => 'convertCharset');
|
||||
|
||||
if(!empty($config->isINT))
|
||||
{
|
||||
|
||||
@@ -10870,11 +10870,11 @@ class upgradeModel extends model
|
||||
if(empty($matches[1])) return true;
|
||||
|
||||
/* 转换数据库文件中的表的字符集。Convert tables charset. */
|
||||
// foreach($matches[1] as $table)
|
||||
// {
|
||||
// $table = str_replace('zt_', $this->config->db->prefix, $table);
|
||||
// $this->dao->query("ALTER TABLE `$table` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci");
|
||||
// }
|
||||
foreach($matches[1] as $table)
|
||||
{
|
||||
$table = str_replace('zt_', $this->config->db->prefix, $table);
|
||||
$this->dao->query("ALTER TABLE `$table` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user