From 344b1983a81922dfee19c091b1d062e67e1c7948 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 6 Mar 2015 14:39:57 +0900 Subject: [PATCH] =?UTF-8?q?cart=20=ED=85=8C=EC=9D=B4=EB=B8=94=20index=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/gnuboard5shop.sql | 4 +++- orderupgrade.php | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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');