mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#18218192 추가 수정(r6763에 추가로 수정)
CUBRID를 DB로 사용시 발생하는 모듈 관련 문제(업데이트가 관리 페이지에서 계속 나타나는 등의 문제이며 원인은 INDEX 관련 처리 루틴의 문제임-moduleUpdate 함수, 수정한 각 모듈의 주 클래스-) counter 모듈 및 editor 모듈 수정. git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6764 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
274f98219c
commit
a690db5f82
2 changed files with 32 additions and 7 deletions
|
|
@ -26,10 +26,16 @@
|
|||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$db_info = Context::getDbInfo ();
|
||||
// 카운터에 site_srl추가
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists('counter_log', 'site_srl')) return true;
|
||||
if(!$oDB->isIndexExists('counter_log','idx_site_counter_log')) return true;
|
||||
if ($db_info->db_type == 'cubrid') {
|
||||
if(!$oDB->isIndexExists('counter_log', $oDB->prefix.'counter_log_idx_site_counter_log')) return true;
|
||||
}
|
||||
else {
|
||||
if(!$oDB->isIndexExists('counter_log','idx_site_counter_log')) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -37,12 +43,19 @@
|
|||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$db_info = Context::getDBInfo ();
|
||||
// 카운터에 site_srl추가
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists('counter_log', 'site_srl'))
|
||||
$oDB->addColumn('counter_log','site_srl','number',11,0,true);
|
||||
if(!$oDB->isIndexExists('counter_log','idx_site_counter_log'))
|
||||
$oDB->addIndex('counter_log','idx_site_counter_log',array('site_srl','ipaddress'),false);
|
||||
if ($db_info->db_type == 'cubrid') {
|
||||
if(!$oDB->isIndexExists('counter_log',$oDB->prefix.'counter_log_idx_site_counter_log'))
|
||||
$oDB->addIndex('counter_log',$oDB->prefix.'counter_log_idx_site_counter_log',array('site_srl','ipaddress'),false);
|
||||
}
|
||||
else {
|
||||
if(!$oDB->isIndexExists('counter_log','idx_site_counter_log'))
|
||||
$oDB->addIndex('counter_log','idx_site_counter_log',array('site_srl','ipaddress'),false);
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$db_info = Context::getDBInfo ();
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
@ -55,7 +56,12 @@
|
|||
if(!$oDB->isColumnExists("editor_autosave","module_srl")) return true;
|
||||
|
||||
// 2009. 06. 15 module_srl을 인덱스로
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl")) return true;
|
||||
if ($db_info->db_type == 'cubrid') {
|
||||
if(!$oDB->isIndexExists("editor_autosave",$oDB->prefix."editor_autosave_idx_module_srl")) return true;
|
||||
}
|
||||
else {
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl")) return true;
|
||||
}
|
||||
|
||||
|
||||
// 2007. 10. 17 글의 입력(신규 or 수정)이 일어날때마다 자동 저장된 문서를 삭제하는 trigger 추가
|
||||
|
|
@ -78,6 +84,7 @@
|
|||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$db_info = Context::getDBInfo ();
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
|
|
@ -88,9 +95,14 @@
|
|||
$oDB->addColumn("editor_autosave","module_srl","number",11);
|
||||
|
||||
// module_srl을 인덱스로
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl"))
|
||||
$oDB->addIndex("editor_autosave","idx_module_srl", "module_srl");
|
||||
|
||||
if ($db_info->db_type == 'cubrid') {
|
||||
if(!$oDB->isIndexExists("editor_autosave",$oDB->prefix."editor_autosave_idx_module_srl"))
|
||||
$oDB->addIndex("editor_autosave",$oDB->prefix."editor_autosave_idx_module_srl", "module_srl");
|
||||
}
|
||||
else {
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl"))
|
||||
$oDB->addIndex("editor_autosave","idx_module_srl", "module_srl");
|
||||
}
|
||||
|
||||
// 2007. 10. 17 글의 입력(신규 or 수정)이 일어날때마다 자동 저장된 문서를 삭제하는 trigger 추가
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue