cart 테이블 index 추가

This commit is contained in:
chicpro
2015-03-06 14:39:57 +09:00
parent a42b219062
commit 344b1983a8
2 changed files with 10 additions and 1 deletions

View File

@ -58,7 +58,9 @@ CREATE TABLE IF NOT EXISTS `g5_shop_cart` (
`ct_select` tinyint(4) NOT NULL DEFAULT '0',
`ct_select_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`ct_id`),
KEY `od_id` (`od_id`)
KEY `od_id` (`od_id`),
KEY `it_id` (`it_id`),
KEY `ct_status` (`ct_status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------

View File

@ -46,6 +46,13 @@ if(!sql_query(" select ct_select_time from {$g5['g5_shop_cart_table']} limit 1 "
ADD `ct_select_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `ct_select` ", true);
}
// cart 테이블 index 추가
if(!sql_fetch(" show keys from {$g5['g5_shop_cart_table']} where Key_name = 'ct_status' ")) {
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
ADD INDEX `it_id` (`it_id`),
ADD INDEX `ct_status` (`ct_status`) ", true);
}
echo '<p>장바구니 테이블 업그레이드 완료!</p>';
include_once(G5_PATH.'/tail.sub.php');