diff --git a/install/gnuboard5shop.sql b/install/gnuboard5shop.sql index 6e9428646..7b05077e8 100644 --- a/install/gnuboard5shop.sql +++ b/install/gnuboard5shop.sql @@ -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; -- -------------------------------------------------------- diff --git a/orderupgrade.php b/orderupgrade.php index 6aa3533f0..5110371cd 100644 --- a/orderupgrade.php +++ b/orderupgrade.php @@ -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 '
장바구니 테이블 업그레이드 완료!
'; include_once(G5_PATH.'/tail.sub.php');