그누보드 [G5] 그누보드4 → 그누보드5 이전 #4/6 (디비 필드 추가)
페이지 정보
본문
그누보드5에서 추가된 테이블의 필드를 추가하기 ( 5.0b35 / 2014-05-19 배포버전 기준 )
아래 내용은 http://www.sir.co.kr/bbs/board.php?bo_table=g5_tip&wr_id=1286 를 참고해서 정리하였습니다.
phpMyAdmin 등에서 필드 추가
1. G5에 추가된 필드
ALTER TABLE `g4_write_테이블` ADD `wr_file` tinyint(4) NOT NULL default '0' AFTER `wr_datetime` ,
ADD `wr_facebook_user` VARCHAR( 255 ) NOT NULL AFTER `wr_ip` ,
ADD `wr_twitter_user` VARCHAR( 255 ) NOT NULL AFTER `wr_facebook_user`
ALTER TABLE `g4_board` ADD `bo_mobile_subject` VARCHAR( 255 ) NOT NULL AFTER `bo_subject` ,
ADD `bo_device` VARCHAR( 255 ) NOT NULL AFTER `bo_mobile_subject` ,
ADD `bo_mobile_subject_len` int(11) NOT NULL default '0' AFTER `bo_subject_len` ,
ADD `bo_mobile_page_rows` int(11) NOT NULL default '0' AFTER `bo_page_rows` ,
ADD `bo_mobile_skin` VARCHAR( 255 ) NOT NULL AFTER `bo_skin` ,
ADD `bo_mobile_content_head` text NOT NULL AFTER `bo_content_head` ,
ADD `bo_gallery_width` text NOT NULL AFTER `bo_gallery_cols` ,
ADD `bo_gallery_height` text NOT NULL AFTER `bo_gallery_width` ,
ADD `bo_order` tinyint(4) NOT NULL default '0' AFTER `bo_use_search` ,
ADD `bo_use_cert` enum('','cert','adult','hp-cert','hp-adult') NOT NULL default '' AFTER `bo_use_email` ,
ADD `bo_use_sns` tinyint(4) NOT NULL default '0' AFTER `bo_use_cert`
ALTER TABLE `g4_config` ADD `cf_theme` VARCHAR( 255 ) NOT NULL AFTER `cf_title` ,
ADD `cf_admin_email` VARCHAR( 255 ) NOT NULL AFTER `cf_admin` ,
ADD `cf_admin_email_name` VARCHAR( 255 ) NOT NULL AFTER `cf_admin_email` ,
ADD `cf_add_script` VARCHAR( 255 ) NOT NULL AFTER `cf_admin_email_name` ,
ADD `cf_point_term` int(11) NOT NULL default '0' AFTER `cf_use_point` ,
ADD `cf_faq_skin` VARCHAR( 255 ) NOT NULL AFTER `cf_connect_skin` ,
ADD `cf_mobile_pages` int(11) NOT NULL default '0' AFTER `cf_write_pages` ,
ADD `cf_analytics` text NOT NULL AFTER `cf_intercept_ip` ,
ADD `cf_add_meta` text NOT NULL AFTER `cf_analytics` ,
ADD `cf_syndi_token` VARCHAR( 255 ) NOT NULL default '' AFTER `cf_add_meta` ,
ADD `cf_syndi_except` text NOT NULL AFTER `cf_syndi_token` ,
ADD `cf_optimize_date` date NOT NULL default '0000-00-00' AFTER `cf_popular_del` ,
ADD `cf_mobile_new_skin` varchar(255) NOT NULL default '' AFTER `cf_popular_del` ,
ADD `cf_mobile_search_skin` varchar(255) NOT NULL default '' AFTER `cf_memo_send_point` ,
ADD `cf_mobile_connect_skin` varchar(255) NOT NULL default '' AFTER `cf_mobile_search_skin` ,
ADD `cf_mobile_faq_skin` varchar(255) NOT NULL default '' AFTER `cf_mobile_connect_skin` ,
ADD `cf_mobile_member_skin` varchar(255) NOT NULL default '' AFTER `cf_mobile_faq_skin` ,
ADD `cf_captcha_mp3` varchar(255) NOT NULL default '' AFTER `cf_mobile_member_skin` ,
ADD `cf_editor` varchar(255) NOT NULL default '' AFTER `cf_captcha_mp3` ,
ADD `cf_cert_use` tinyint(4) NOT NULL default '0' AFTER `cf_editor` ,
ADD `cf_cert_ipin` varchar(255) NOT NULL default '' AFTER `cf_cert_use` ,
ADD `cf_cert_hp` varchar(255) NOT NULL default '' AFTER `cf_cert_ipin` ,
ADD `cf_cert_kcb_cd` varchar(255) NOT NULL default '' AFTER `cf_cert_hp` ,
ADD `cf_cert_kcp_cd` varchar(255) NOT NULL default '' AFTER `cf_cert_kcb_cd` ,
ADD `cf_lg_mid` varchar(255) NOT NULL default '' AFTER `cf_cert_kcp_cd` ,
ADD `cf_lg_mert_key` varchar(255) NOT NULL default '' AFTER `cf_lg_mid` ,
ADD `cf_cert_limit` int(11) NOT NULL default '0' AFTER `cf_lg_mert_key` ,
ADD `cf_cert_req` tinyint(4) NOT NULL default '0' AFTER `cf_cert_limit` ,
ADD `cf_sms_use` varchar(255) NOT NULL default '' AFTER `cf_cert_req` ,
ADD `cf_sms_type` varchar(10) NOT NULL default '' AFTER `cf_sms_use` ,
ADD `cf_icode_id` varchar(255) NOT NULL default '' AFTER `cf_sms_type` ,
ADD `cf_icode_pw` varchar(255) NOT NULL default '' AFTER `cf_icode_id` ,
ADD `cf_icode_server_ip` varchar(255) NOT NULL default '' AFTER `cf_icode_pw` ,
ADD `cf_icode_server_port` varchar(255) NOT NULL default '' AFTER `cf_icode_server_ip` ,
ADD `cf_googl_shorturl_apikey` varchar(255) NOT NULL default '' AFTER `cf_icode_server_port` ,
ADD `cf_facebook_appid` varchar(255) NOT NULL AFTER `cf_googl_shorturl_apikey` ,
ADD `cf_facebook_secret` varchar(255) NOT NULL AFTER `cf_facebook_appid` ,
ADD `cf_twitter_key` varchar(255) NOT NULL AFTER `cf_facebook_secret` ,
ADD `cf_twitter_secret` varchar(255) NOT NULL AFTER `cf_twitter_key` ,
ADD `cf_kakao_js_apikey` varchar(255) NOT NULL AFTER `cf_twitter_secret`
ALTER TABLE `g4_group` ADD `gr_device` enum('both','pc','mobile') NOT NULL default 'both' AFTER `gr_subject`,
ADD `gr_order` int(11) NOT NULL default '0' AFTER `gr_use_access`
2. G5에 추가된 테이블
CREATE TABLE IF NOT EXISTS `g5_autosave` (
`as_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL,
`as_uid` bigint(20) unsigned NOT NULL,
`as_subject` varchar(255) NOT NULL,
`as_content` text NOT NULL,
`as_datetime` datetime NOT NULL,
PRIMARY KEY (`as_id`),
UNIQUE KEY `as_uid` (`as_uid`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `g5_cert_history` (
`cr_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL default '',
`cr_company` varchar(255) NOT NULL default '',
`cr_method` varchar(255) NOT NULL default '',
`cr_ip` varchar(255) NOT NULL default '',
`cr_date` date NOT NULL default '0000-00-00',
`cr_time` time NOT NULL default '00:00:00',
PRIMARY KEY (`cr_id`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `g5_content` (
`co_id` varchar(20) NOT NULL default '',
`co_html` tinyint(4) NOT NULL default '0',
`co_subject` varchar(255) NOT NULL default '',
`co_content` longtext NOT NULL,
`co_mobile_content` longtext NOT NULL,
`co_skin` varchar(255) NOT NULL default '',
`co_mobile_skin` varchar(255) NOT NULL default '',
`co_tag_filter_use` tinyint(4) NOT NULL default '0',
`co_hit` int(11) NOT NULL default '0',
`co_include_head` varchar(255) NOT NULL,
`co_include_tail` varchar(255) NOT NULL,
PRIMARY KEY (`co_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `g5_faq` (
`fa_id` int(11) NOT NULL auto_increment,
`fm_id` int(11) NOT NULL default '0',
`fa_subject` text NOT NULL,
`fa_content` text NOT NULL,
`fa_order` int(11) NOT NULL default '0',
PRIMARY KEY (`fa_id`),
KEY `fm_id` (`fm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `g5_faq_master` (
`fm_id` int(11) NOT NULL auto_increment,
`fm_subject` varchar(255) NOT NULL default '',
`fm_head_html` text NOT NULL,
`fm_tail_html` text NOT NULL,
`fm_mobile_head_html` text NOT NULL,
`fm_mobile_tail_html` text NOT NULL,
`fm_order` int(11) NOT NULL default '0',
PRIMARY KEY (`fm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
3. G5에서 제거된 필드
ALTER TABLE `g5_board` ADD `bo_trackback_level` tinyint(4) NOT NULL default '0' AFTER `bo_link_level` ,
ADD `bo_disable_tags` text NOT NULL AFTER `bo_category_list` ,
ADD `bo_use_comment` tinyint(4) NOT NULL default '0' AFTER `bo_use_rss_view` ,
ADD `bo_use_trackback` tinyint(4) NOT NULL default '0' AFTER `bo_use_ip_view` ,
ADD `bo_image_head` VARCHAR( 255 ) NOT NULL AFTER `bo_skin` ,
ADD `bo_image_tail` VARCHAR( 255 ) NOT NULL AFTER `bo_image_head` ,
ADD `bo_order_search` tinyint(4) NOT NULL default '0' AFTER `bo_use_search`
ALTER TABLE `g5_config` ADD `cf_use_norobot` tinyint(4) NOT NULL default '0' AFTER `cf_use_point` ,
ADD `cf_syndi_token` varchar(255) NOT NULL AFTER `cf_filter` ,
ADD `cf_syndi_except` text NOT NULL AFTER `cf_syndi_token` ,
ADD `cf_register_skin` varchar(255) NOT NULL default 'basic' AFTER `cf_intercept_ip` ,
ADD `cf_use_jumin` tinyint(4) NOT NULL default '0' AFTER `cf_popular_del`
ALTER TABLE `g5_write_테이블` ADD `wr_trackback` VARCHAR( 255 ) NOT NULL AFTER `wr_link2_hit`
/ extend / 폴더에 첨부된 내용을 저장후 실행하면 누락된 필드가 생성됩니다.
<?php
if (!defined('_GNUBOARD_')) exit;
/*
*/
//
sql_query("alter table $g5[member_table] add `mb_certify` varchar(20) NOT NULL default '' ", false);
sql_query("alter table $g5[member_table] add `mb_adult` tinyint(4) NOT NULL default '0' ", false);
sql_query("alter table $g5[member_table] add `mb_addr3` varchar(255) NOT NULL default '' ", false);
sql_query("alter table $g5[member_table] add `mb_addr_jibeon` varchar(255) NOT NULL default '' ", false);
sql_query("alter table $g5[member_table] add `mb_dupinfo` varchar(255) NOT NULL default '' ", false);
sql_query("alter table $g5[member_table] add `mb_email_certify2` varchar(255) NOT NULL default '' ", false);
//
sql_query("alter table $g5[point_table] add `po_use_point` int(11) NOT NULL default '0'", false);
sql_query("alter table $g5[point_table] add `po_expired` tinyint(4) NOT NULL default '0'", false);
sql_query("alter table $g5[point_table] add `po_expire_date` date NOT NULL default '0000-00-00'", false);
sql_query("alter table $g5[point_table] add `po_mb_point` int(11) NOT NULL default '0'", false);
sql_query("alter table $g5[point_table] add KEY `index2` (`po_expire_date`)", false);
// 게시판 종류별로 추가 시작
/*
$hp_g5_write_board = "banner";
sql_query("alter table g5_write_". $hp_g5_write_board ." add `wr_file` tinyint(4) NOT NULL default '0'", false);
sql_query("alter table g5_write_". $hp_g5_write_board ." add `wr_facebook_user` varchar(255) NOT NULL DEFAULT ''", false);
sql_query("alter table g5_write_". $hp_g5_write_board ." add `wr_twitter_user` varchar(255) NOT NULL DEFAULT ''", false);
//sql_query("alter table g5_write_". $hp_g5_write_board ." add `wr_me2day_user` varchar(255) NOT NULL DEFAULT ''", false);
*/
// 게시판 종류별로 추가 끝
sql_query("
CREATE TABLE IF NOT EXISTS $g5[cert_history_table] (
`cr_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL DEFAULT '',
`cr_company` varchar(255) NOT NULL DEFAULT '',
`cr_method` varchar(255) NOT NULL DEFAULT '',
`cr_ip` varchar(255) NOT NULL DEFAULT '',
`cr_date` date NOT NULL DEFAULT '0000-00-00',
`cr_time` time NOT NULL DEFAULT '00:00:00',
PRIMARY KEY (`cr_id`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS ".$g5['uniqid_table']." (
`uq_id` bigint(20) unsigned NOT NULL,
`uq_ip` varchar(255) NOT NULL,
PRIMARY KEY (`uq_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS ".$g5['syndi_log_table']." (
`content_id` int(11) NOT NULL,
`bbs_id` varchar(50) NOT NULL,
`title` text NOT NULL,
`link_alternative` varchar(250) NOT NULL,
`delete_date` varchar(14) NOT NULL,
PRIMARY KEY (`content_id`,`bbs_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS ".$g5['autosave_table']." (
`as_id` int(11) NOT NULL AUTO_INCREMENT,
`mb_id` varchar(20) NOT NULL,
`as_uid` bigint(20) unsigned NOT NULL,
`as_subject` varchar(255) NOT NULL,
`as_content` text NOT NULL,
`as_datetime` datetime NOT NULL,
PRIMARY KEY (`as_id`),
UNIQUE KEY `as_uid` (`as_uid`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS $g5[qa_config_table] (
`qa_title` varchar(255) NOT NULL DEFAULT'',
`qa_category` varchar(255) NOT NULL DEFAULT'',
`qa_skin` varchar(255) NOT NULL DEFAULT '',
`qa_mobile_skin` varchar(255) NOT NULL DEFAULT '',
`qa_use_email` tinyint(4) NOT NULL DEFAULT '0',
`qa_req_email` tinyint(4) NOT NULL DEFAULT '0',
`qa_use_hp` tinyint(4) NOT NULL DEFAULT '0',
`qa_req_hp` tinyint(4) NOT NULL DEFAULT '0',
`qa_use_sms` tinyint(4) NOT NULL DEFAULT '0',
`qa_send_number` varchar(255) NOT NULL DEFAULT '0',
`qa_admin_hp` varchar(255) NOT NULL DEFAULT '',
`qa_use_editor` tinyint(4) NOT NULL DEFAULT '0',
`qa_subject_len` int(11) NOT NULL DEFAULT '0',
`qa_mobile_subject_len` int(11) NOT NULL DEFAULT '0',
`qa_page_rows` int(11) NOT NULL DEFAULT '0',
`qa_mobile_page_rows` int(11) NOT NULL DEFAULT '0',
`qa_image_width` int(11) NOT NULL DEFAULT '0',
`qa_upload_size` int(11) NOT NULL DEFAULT '0',
`qa_insert_content` text NOT NULL,
`qa_1_subj` varchar(255) NOT NULL DEFAULT '',
`qa_2_subj` varchar(255) NOT NULL DEFAULT '',
`qa_3_subj` varchar(255) NOT NULL DEFAULT '',
`qa_4_subj` varchar(255) NOT NULL DEFAULT '',
`qa_5_subj` varchar(255) NOT NULL DEFAULT '',
`qa_1` varchar(255) NOT NULL DEFAULT '',
`qa_2` varchar(255) NOT NULL DEFAULT '',
`qa_3` varchar(255) NOT NULL DEFAULT '',
`qa_4` varchar(255) NOT NULL DEFAULT '',
`qa_5` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS $g5[qa_content_table] (
`qa_id` int(11) NOT NULL AUTO_INCREMENT,
`qa_num` int(11) NOT NULL DEFAULT '0',
`qa_parent` int(11) NOT NULL DEFAULT '0',
`qa_related` int(11) NOT NULL DEFAULT '0',
`mb_id` varchar(20) NOT NULL DEFAULT '',
`qa_name` varchar(255) NOT NULL DEFAULT '',
`qa_email` varchar(255) NOT NULL DEFAULT '',
`qa_hp` varchar(255) NOT NULL DEFAULT '',
`qa_type` tinyint(4) NOT NULL DEFAULT '0',
`qa_category` varchar(255) NOT NULL DEFAULT '',
`qa_email_recv` tinyint(4) NOT NULL DEFAULT '0',
`qa_sms_recv` tinyint(4) NOT NULL DEFAULT '0',
`qa_html` tinyint(4) NOT NULL DEFAULT '0',
`qa_subject` varchar(255) NOT NULL DEFAULT '',
`qa_content` text NOT NULL,
`qa_status` tinyint(4) NOT NULL DEFAULT '0',
`qa_file1` varchar(255) NOT NULL DEFAULT '',
`qa_source1` varchar(255) NOT NULL DEFAULT '',
`qa_file2` varchar(255) NOT NULL DEFAULT '',
`qa_source2` varchar(255) NOT NULL DEFAULT '',
`qa_ip` varchar(255) NOT NULL DEFAULT '',
`qa_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`qa_1` varchar(255) NOT NULL DEFAULT '',
`qa_2` varchar(255) NOT NULL DEFAULT '',
`qa_3` varchar(255) NOT NULL DEFAULT '',
`qa_4` varchar(255) NOT NULL DEFAULT '',
`qa_5` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`qa_id`),
KEY `qa_num_parent` (`qa_num`,`qa_parent`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
/* // 테이블 추가
CREATE TABLE IF NOT EXISTS `g5_write_게시판이름` (
`wr_id` int(11) NOT NULL auto_increment,
`wr_num` int(11) NOT NULL default '0',
`wr_reply` varchar(10) NOT NULL,
`wr_parent` int(11) NOT NULL default '0',
`wr_is_comment` tinyint(4) NOT NULL default '0',
`wr_comment` int(11) NOT NULL default '0',
`wr_comment_reply` varchar(5) NOT NULL,
`ca_name` varchar(255) NOT NULL,
`wr_option` set('html1','html2','secret','mail') NOT NULL,
`wr_subject` varchar(255) NOT NULL,
`wr_content` text NOT NULL,
`wr_link1` text NOT NULL,
`wr_link2` text NOT NULL,
`wr_link1_hit` int(11) NOT NULL default '0',
`wr_link2_hit` int(11) NOT NULL default '0',
`wr_hit` int(11) NOT NULL default '0',
`wr_good` int(11) NOT NULL default '0',
`wr_nogood` int(11) NOT NULL default '0',
`mb_id` varchar(20) NOT NULL,
`wr_password` varchar(255) NOT NULL,
`wr_name` varchar(255) NOT NULL,
`wr_email` varchar(255) NOT NULL,
`wr_homepage` varchar(255) NOT NULL,
`wr_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`wr_file` tinyint(4) NOT NULL default '0',
`wr_last` varchar(19) NOT NULL,
`wr_ip` varchar(255) NOT NULL,
`wr_facebook_user` varchar(255) NOT NULL,
`wr_twitter_user` varchar(255) NOT NULL,
`wr_1` varchar(255) NOT NULL,
`wr_2` varchar(255) NOT NULL,
`wr_3` varchar(255) NOT NULL,
`wr_4` varchar(255) NOT NULL,
`wr_5` varchar(255) NOT NULL,
`wr_6` varchar(255) NOT NULL,
`wr_7` varchar(255) NOT NULL,
`wr_8` varchar(255) NOT NULL,
`wr_9` varchar(255) NOT NULL,
`wr_10` varchar(255) NOT NULL,
PRIMARY KEY (`wr_id`),
KEY `wr_num_reply_parent` (`wr_num`,`wr_reply`,`wr_parent`),
KEY `wr_is_comment` (`wr_is_comment`,`wr_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
*/
?>
아래 내용은 http://www.sir.co.kr/bbs/board.php?bo_table=g5_tip&wr_id=1286 를 참고해서 정리하였습니다.
phpMyAdmin 등에서 필드 추가
1. G5에 추가된 필드
ALTER TABLE `g4_write_테이블` ADD `wr_file` tinyint(4) NOT NULL default '0' AFTER `wr_datetime` ,
ADD `wr_facebook_user` VARCHAR( 255 ) NOT NULL AFTER `wr_ip` ,
ADD `wr_twitter_user` VARCHAR( 255 ) NOT NULL AFTER `wr_facebook_user`
ALTER TABLE `g4_board` ADD `bo_mobile_subject` VARCHAR( 255 ) NOT NULL AFTER `bo_subject` ,
ADD `bo_device` VARCHAR( 255 ) NOT NULL AFTER `bo_mobile_subject` ,
ADD `bo_mobile_subject_len` int(11) NOT NULL default '0' AFTER `bo_subject_len` ,
ADD `bo_mobile_page_rows` int(11) NOT NULL default '0' AFTER `bo_page_rows` ,
ADD `bo_mobile_skin` VARCHAR( 255 ) NOT NULL AFTER `bo_skin` ,
ADD `bo_mobile_content_head` text NOT NULL AFTER `bo_content_head` ,
ADD `bo_gallery_width` text NOT NULL AFTER `bo_gallery_cols` ,
ADD `bo_gallery_height` text NOT NULL AFTER `bo_gallery_width` ,
ADD `bo_order` tinyint(4) NOT NULL default '0' AFTER `bo_use_search` ,
ADD `bo_use_cert` enum('','cert','adult','hp-cert','hp-adult') NOT NULL default '' AFTER `bo_use_email` ,
ADD `bo_use_sns` tinyint(4) NOT NULL default '0' AFTER `bo_use_cert`
ALTER TABLE `g4_config` ADD `cf_theme` VARCHAR( 255 ) NOT NULL AFTER `cf_title` ,
ADD `cf_admin_email` VARCHAR( 255 ) NOT NULL AFTER `cf_admin` ,
ADD `cf_admin_email_name` VARCHAR( 255 ) NOT NULL AFTER `cf_admin_email` ,
ADD `cf_add_script` VARCHAR( 255 ) NOT NULL AFTER `cf_admin_email_name` ,
ADD `cf_point_term` int(11) NOT NULL default '0' AFTER `cf_use_point` ,
ADD `cf_faq_skin` VARCHAR( 255 ) NOT NULL AFTER `cf_connect_skin` ,
ADD `cf_mobile_pages` int(11) NOT NULL default '0' AFTER `cf_write_pages` ,
ADD `cf_analytics` text NOT NULL AFTER `cf_intercept_ip` ,
ADD `cf_add_meta` text NOT NULL AFTER `cf_analytics` ,
ADD `cf_syndi_token` VARCHAR( 255 ) NOT NULL default '' AFTER `cf_add_meta` ,
ADD `cf_syndi_except` text NOT NULL AFTER `cf_syndi_token` ,
ADD `cf_optimize_date` date NOT NULL default '0000-00-00' AFTER `cf_popular_del` ,
ADD `cf_mobile_new_skin` varchar(255) NOT NULL default '' AFTER `cf_popular_del` ,
ADD `cf_mobile_search_skin` varchar(255) NOT NULL default '' AFTER `cf_memo_send_point` ,
ADD `cf_mobile_connect_skin` varchar(255) NOT NULL default '' AFTER `cf_mobile_search_skin` ,
ADD `cf_mobile_faq_skin` varchar(255) NOT NULL default '' AFTER `cf_mobile_connect_skin` ,
ADD `cf_mobile_member_skin` varchar(255) NOT NULL default '' AFTER `cf_mobile_faq_skin` ,
ADD `cf_captcha_mp3` varchar(255) NOT NULL default '' AFTER `cf_mobile_member_skin` ,
ADD `cf_editor` varchar(255) NOT NULL default '' AFTER `cf_captcha_mp3` ,
ADD `cf_cert_use` tinyint(4) NOT NULL default '0' AFTER `cf_editor` ,
ADD `cf_cert_ipin` varchar(255) NOT NULL default '' AFTER `cf_cert_use` ,
ADD `cf_cert_hp` varchar(255) NOT NULL default '' AFTER `cf_cert_ipin` ,
ADD `cf_cert_kcb_cd` varchar(255) NOT NULL default '' AFTER `cf_cert_hp` ,
ADD `cf_cert_kcp_cd` varchar(255) NOT NULL default '' AFTER `cf_cert_kcb_cd` ,
ADD `cf_lg_mid` varchar(255) NOT NULL default '' AFTER `cf_cert_kcp_cd` ,
ADD `cf_lg_mert_key` varchar(255) NOT NULL default '' AFTER `cf_lg_mid` ,
ADD `cf_cert_limit` int(11) NOT NULL default '0' AFTER `cf_lg_mert_key` ,
ADD `cf_cert_req` tinyint(4) NOT NULL default '0' AFTER `cf_cert_limit` ,
ADD `cf_sms_use` varchar(255) NOT NULL default '' AFTER `cf_cert_req` ,
ADD `cf_sms_type` varchar(10) NOT NULL default '' AFTER `cf_sms_use` ,
ADD `cf_icode_id` varchar(255) NOT NULL default '' AFTER `cf_sms_type` ,
ADD `cf_icode_pw` varchar(255) NOT NULL default '' AFTER `cf_icode_id` ,
ADD `cf_icode_server_ip` varchar(255) NOT NULL default '' AFTER `cf_icode_pw` ,
ADD `cf_icode_server_port` varchar(255) NOT NULL default '' AFTER `cf_icode_server_ip` ,
ADD `cf_googl_shorturl_apikey` varchar(255) NOT NULL default '' AFTER `cf_icode_server_port` ,
ADD `cf_facebook_appid` varchar(255) NOT NULL AFTER `cf_googl_shorturl_apikey` ,
ADD `cf_facebook_secret` varchar(255) NOT NULL AFTER `cf_facebook_appid` ,
ADD `cf_twitter_key` varchar(255) NOT NULL AFTER `cf_facebook_secret` ,
ADD `cf_twitter_secret` varchar(255) NOT NULL AFTER `cf_twitter_key` ,
ADD `cf_kakao_js_apikey` varchar(255) NOT NULL AFTER `cf_twitter_secret`
ALTER TABLE `g4_group` ADD `gr_device` enum('both','pc','mobile') NOT NULL default 'both' AFTER `gr_subject`,
ADD `gr_order` int(11) NOT NULL default '0' AFTER `gr_use_access`
2. G5에 추가된 테이블
CREATE TABLE IF NOT EXISTS `g5_autosave` (
`as_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL,
`as_uid` bigint(20) unsigned NOT NULL,
`as_subject` varchar(255) NOT NULL,
`as_content` text NOT NULL,
`as_datetime` datetime NOT NULL,
PRIMARY KEY (`as_id`),
UNIQUE KEY `as_uid` (`as_uid`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `g5_cert_history` (
`cr_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL default '',
`cr_company` varchar(255) NOT NULL default '',
`cr_method` varchar(255) NOT NULL default '',
`cr_ip` varchar(255) NOT NULL default '',
`cr_date` date NOT NULL default '0000-00-00',
`cr_time` time NOT NULL default '00:00:00',
PRIMARY KEY (`cr_id`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `g5_content` (
`co_id` varchar(20) NOT NULL default '',
`co_html` tinyint(4) NOT NULL default '0',
`co_subject` varchar(255) NOT NULL default '',
`co_content` longtext NOT NULL,
`co_mobile_content` longtext NOT NULL,
`co_skin` varchar(255) NOT NULL default '',
`co_mobile_skin` varchar(255) NOT NULL default '',
`co_tag_filter_use` tinyint(4) NOT NULL default '0',
`co_hit` int(11) NOT NULL default '0',
`co_include_head` varchar(255) NOT NULL,
`co_include_tail` varchar(255) NOT NULL,
PRIMARY KEY (`co_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `g5_faq` (
`fa_id` int(11) NOT NULL auto_increment,
`fm_id` int(11) NOT NULL default '0',
`fa_subject` text NOT NULL,
`fa_content` text NOT NULL,
`fa_order` int(11) NOT NULL default '0',
PRIMARY KEY (`fa_id`),
KEY `fm_id` (`fm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `g5_faq_master` (
`fm_id` int(11) NOT NULL auto_increment,
`fm_subject` varchar(255) NOT NULL default '',
`fm_head_html` text NOT NULL,
`fm_tail_html` text NOT NULL,
`fm_mobile_head_html` text NOT NULL,
`fm_mobile_tail_html` text NOT NULL,
`fm_order` int(11) NOT NULL default '0',
PRIMARY KEY (`fm_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
3. G5에서 제거된 필드
ALTER TABLE `g5_board` ADD `bo_trackback_level` tinyint(4) NOT NULL default '0' AFTER `bo_link_level` ,
ADD `bo_disable_tags` text NOT NULL AFTER `bo_category_list` ,
ADD `bo_use_comment` tinyint(4) NOT NULL default '0' AFTER `bo_use_rss_view` ,
ADD `bo_use_trackback` tinyint(4) NOT NULL default '0' AFTER `bo_use_ip_view` ,
ADD `bo_image_head` VARCHAR( 255 ) NOT NULL AFTER `bo_skin` ,
ADD `bo_image_tail` VARCHAR( 255 ) NOT NULL AFTER `bo_image_head` ,
ADD `bo_order_search` tinyint(4) NOT NULL default '0' AFTER `bo_use_search`
ALTER TABLE `g5_config` ADD `cf_use_norobot` tinyint(4) NOT NULL default '0' AFTER `cf_use_point` ,
ADD `cf_syndi_token` varchar(255) NOT NULL AFTER `cf_filter` ,
ADD `cf_syndi_except` text NOT NULL AFTER `cf_syndi_token` ,
ADD `cf_register_skin` varchar(255) NOT NULL default 'basic' AFTER `cf_intercept_ip` ,
ADD `cf_use_jumin` tinyint(4) NOT NULL default '0' AFTER `cf_popular_del`
ALTER TABLE `g5_write_테이블` ADD `wr_trackback` VARCHAR( 255 ) NOT NULL AFTER `wr_link2_hit`
/ extend / 폴더에 첨부된 내용을 저장후 실행하면 누락된 필드가 생성됩니다.
<?php
if (!defined('_GNUBOARD_')) exit;
/*
*/
//
sql_query("alter table $g5[member_table] add `mb_certify` varchar(20) NOT NULL default '' ", false);
sql_query("alter table $g5[member_table] add `mb_adult` tinyint(4) NOT NULL default '0' ", false);
sql_query("alter table $g5[member_table] add `mb_addr3` varchar(255) NOT NULL default '' ", false);
sql_query("alter table $g5[member_table] add `mb_addr_jibeon` varchar(255) NOT NULL default '' ", false);
sql_query("alter table $g5[member_table] add `mb_dupinfo` varchar(255) NOT NULL default '' ", false);
sql_query("alter table $g5[member_table] add `mb_email_certify2` varchar(255) NOT NULL default '' ", false);
//
sql_query("alter table $g5[point_table] add `po_use_point` int(11) NOT NULL default '0'", false);
sql_query("alter table $g5[point_table] add `po_expired` tinyint(4) NOT NULL default '0'", false);
sql_query("alter table $g5[point_table] add `po_expire_date` date NOT NULL default '0000-00-00'", false);
sql_query("alter table $g5[point_table] add `po_mb_point` int(11) NOT NULL default '0'", false);
sql_query("alter table $g5[point_table] add KEY `index2` (`po_expire_date`)", false);
// 게시판 종류별로 추가 시작
/*
$hp_g5_write_board = "banner";
sql_query("alter table g5_write_". $hp_g5_write_board ." add `wr_file` tinyint(4) NOT NULL default '0'", false);
sql_query("alter table g5_write_". $hp_g5_write_board ." add `wr_facebook_user` varchar(255) NOT NULL DEFAULT ''", false);
sql_query("alter table g5_write_". $hp_g5_write_board ." add `wr_twitter_user` varchar(255) NOT NULL DEFAULT ''", false);
*/
// 게시판 종류별로 추가 끝
sql_query("
CREATE TABLE IF NOT EXISTS $g5[cert_history_table] (
`cr_id` int(11) NOT NULL auto_increment,
`mb_id` varchar(20) NOT NULL DEFAULT '',
`cr_company` varchar(255) NOT NULL DEFAULT '',
`cr_method` varchar(255) NOT NULL DEFAULT '',
`cr_ip` varchar(255) NOT NULL DEFAULT '',
`cr_date` date NOT NULL DEFAULT '0000-00-00',
`cr_time` time NOT NULL DEFAULT '00:00:00',
PRIMARY KEY (`cr_id`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS ".$g5['uniqid_table']." (
`uq_id` bigint(20) unsigned NOT NULL,
`uq_ip` varchar(255) NOT NULL,
PRIMARY KEY (`uq_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS ".$g5['syndi_log_table']." (
`content_id` int(11) NOT NULL,
`bbs_id` varchar(50) NOT NULL,
`title` text NOT NULL,
`link_alternative` varchar(250) NOT NULL,
`delete_date` varchar(14) NOT NULL,
PRIMARY KEY (`content_id`,`bbs_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS ".$g5['autosave_table']." (
`as_id` int(11) NOT NULL AUTO_INCREMENT,
`mb_id` varchar(20) NOT NULL,
`as_uid` bigint(20) unsigned NOT NULL,
`as_subject` varchar(255) NOT NULL,
`as_content` text NOT NULL,
`as_datetime` datetime NOT NULL,
PRIMARY KEY (`as_id`),
UNIQUE KEY `as_uid` (`as_uid`),
KEY `mb_id` (`mb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS $g5[qa_config_table] (
`qa_title` varchar(255) NOT NULL DEFAULT'',
`qa_category` varchar(255) NOT NULL DEFAULT'',
`qa_skin` varchar(255) NOT NULL DEFAULT '',
`qa_mobile_skin` varchar(255) NOT NULL DEFAULT '',
`qa_use_email` tinyint(4) NOT NULL DEFAULT '0',
`qa_req_email` tinyint(4) NOT NULL DEFAULT '0',
`qa_use_hp` tinyint(4) NOT NULL DEFAULT '0',
`qa_req_hp` tinyint(4) NOT NULL DEFAULT '0',
`qa_use_sms` tinyint(4) NOT NULL DEFAULT '0',
`qa_send_number` varchar(255) NOT NULL DEFAULT '0',
`qa_admin_hp` varchar(255) NOT NULL DEFAULT '',
`qa_use_editor` tinyint(4) NOT NULL DEFAULT '0',
`qa_subject_len` int(11) NOT NULL DEFAULT '0',
`qa_mobile_subject_len` int(11) NOT NULL DEFAULT '0',
`qa_page_rows` int(11) NOT NULL DEFAULT '0',
`qa_mobile_page_rows` int(11) NOT NULL DEFAULT '0',
`qa_image_width` int(11) NOT NULL DEFAULT '0',
`qa_upload_size` int(11) NOT NULL DEFAULT '0',
`qa_insert_content` text NOT NULL,
`qa_1_subj` varchar(255) NOT NULL DEFAULT '',
`qa_2_subj` varchar(255) NOT NULL DEFAULT '',
`qa_3_subj` varchar(255) NOT NULL DEFAULT '',
`qa_4_subj` varchar(255) NOT NULL DEFAULT '',
`qa_5_subj` varchar(255) NOT NULL DEFAULT '',
`qa_1` varchar(255) NOT NULL DEFAULT '',
`qa_2` varchar(255) NOT NULL DEFAULT '',
`qa_3` varchar(255) NOT NULL DEFAULT '',
`qa_4` varchar(255) NOT NULL DEFAULT '',
`qa_5` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
sql_query("
CREATE TABLE IF NOT EXISTS $g5[qa_content_table] (
`qa_id` int(11) NOT NULL AUTO_INCREMENT,
`qa_num` int(11) NOT NULL DEFAULT '0',
`qa_parent` int(11) NOT NULL DEFAULT '0',
`qa_related` int(11) NOT NULL DEFAULT '0',
`mb_id` varchar(20) NOT NULL DEFAULT '',
`qa_name` varchar(255) NOT NULL DEFAULT '',
`qa_email` varchar(255) NOT NULL DEFAULT '',
`qa_hp` varchar(255) NOT NULL DEFAULT '',
`qa_type` tinyint(4) NOT NULL DEFAULT '0',
`qa_category` varchar(255) NOT NULL DEFAULT '',
`qa_email_recv` tinyint(4) NOT NULL DEFAULT '0',
`qa_sms_recv` tinyint(4) NOT NULL DEFAULT '0',
`qa_html` tinyint(4) NOT NULL DEFAULT '0',
`qa_subject` varchar(255) NOT NULL DEFAULT '',
`qa_content` text NOT NULL,
`qa_status` tinyint(4) NOT NULL DEFAULT '0',
`qa_file1` varchar(255) NOT NULL DEFAULT '',
`qa_source1` varchar(255) NOT NULL DEFAULT '',
`qa_file2` varchar(255) NOT NULL DEFAULT '',
`qa_source2` varchar(255) NOT NULL DEFAULT '',
`qa_ip` varchar(255) NOT NULL DEFAULT '',
`qa_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`qa_1` varchar(255) NOT NULL DEFAULT '',
`qa_2` varchar(255) NOT NULL DEFAULT '',
`qa_3` varchar(255) NOT NULL DEFAULT '',
`qa_4` varchar(255) NOT NULL DEFAULT '',
`qa_5` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`qa_id`),
KEY `qa_num_parent` (`qa_num`,`qa_parent`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
", false);
/* // 테이블 추가
CREATE TABLE IF NOT EXISTS `g5_write_게시판이름` (
`wr_id` int(11) NOT NULL auto_increment,
`wr_num` int(11) NOT NULL default '0',
`wr_reply` varchar(10) NOT NULL,
`wr_parent` int(11) NOT NULL default '0',
`wr_is_comment` tinyint(4) NOT NULL default '0',
`wr_comment` int(11) NOT NULL default '0',
`wr_comment_reply` varchar(5) NOT NULL,
`ca_name` varchar(255) NOT NULL,
`wr_option` set('html1','html2','secret','mail') NOT NULL,
`wr_subject` varchar(255) NOT NULL,
`wr_content` text NOT NULL,
`wr_link1` text NOT NULL,
`wr_link2` text NOT NULL,
`wr_link1_hit` int(11) NOT NULL default '0',
`wr_link2_hit` int(11) NOT NULL default '0',
`wr_hit` int(11) NOT NULL default '0',
`wr_good` int(11) NOT NULL default '0',
`wr_nogood` int(11) NOT NULL default '0',
`mb_id` varchar(20) NOT NULL,
`wr_password` varchar(255) NOT NULL,
`wr_name` varchar(255) NOT NULL,
`wr_email` varchar(255) NOT NULL,
`wr_homepage` varchar(255) NOT NULL,
`wr_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`wr_file` tinyint(4) NOT NULL default '0',
`wr_last` varchar(19) NOT NULL,
`wr_ip` varchar(255) NOT NULL,
`wr_facebook_user` varchar(255) NOT NULL,
`wr_twitter_user` varchar(255) NOT NULL,
`wr_1` varchar(255) NOT NULL,
`wr_2` varchar(255) NOT NULL,
`wr_3` varchar(255) NOT NULL,
`wr_4` varchar(255) NOT NULL,
`wr_5` varchar(255) NOT NULL,
`wr_6` varchar(255) NOT NULL,
`wr_7` varchar(255) NOT NULL,
`wr_8` varchar(255) NOT NULL,
`wr_9` varchar(255) NOT NULL,
`wr_10` varchar(255) NOT NULL,
PRIMARY KEY (`wr_id`),
KEY `wr_num_reply_parent` (`wr_num`,`wr_reply`,`wr_parent`),
KEY `wr_is_comment` (`wr_is_comment`,`wr_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
*/
?>
댓글목록
등록된 댓글이 없습니다.