mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-17 09:24:17 +09:00
sites 테이블의 domain 컬럼에 인덱스 제거 및 unique으로 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7115 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7db80f6054
commit
40278bcfa5
2 changed files with 13 additions and 1 deletions
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->addIndex("modules","idx_site_mid", array("site_srl","mid"), true);
|
||||
$oDB->addIndex('sites','unique_domain',array('domain'),true);
|
||||
|
||||
// module 모듈에서 사용할 디렉토리 생성
|
||||
FileHandler::makeDir('./files/cache/module_info');
|
||||
|
|
@ -69,6 +70,9 @@
|
|||
$output = $oDB->executeQuery('module.getSite', $args);
|
||||
if(!$output->data) return true;
|
||||
|
||||
// sites 테이블에서 도메인이 인덱스로 걸린경우
|
||||
if($oDB->isColumnExists('sites', 'idx_domain')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -285,6 +289,14 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
|
||||
if($oDB->isIndexExists('sites','idx_domain')){
|
||||
$oDB->dropIndex('sites','idx_domain');
|
||||
}
|
||||
if(!$oDB->isIndexExists('sites','unique_domain')){
|
||||
$oDB->addIndex('sites','unique_domain',array('domain'),true);
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue