qa_content 데이터타입 text로 변경

This commit is contained in:
chicpro
2013-12-20 17:29:51 +09:00
parent 07f50b56fc
commit 8e7805d105
2 changed files with 8 additions and 2 deletions

View File

@ -57,7 +57,7 @@ if(!sql_query(" DESCRIBE `{$g5['qa_config_table']}` ", false)) {
`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` 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 '',
@ -75,6 +75,12 @@ if(!sql_query(" DESCRIBE `{$g5['qa_config_table']}` ", false)) {
)", true);
}
$sql = " SHOW COLUMNS FROM `{$g5['qa_content_table']}` LIKE 'qa_content' ";
$row = sql_fetch($sql);
if(strpos($row['Type'], 'text') === false) {
sql_query(" ALTER TABLE `{$g5['qa_content_table']}` CHANGE `qa_content` `qa_content` text NOT NULL ", true);
}
$qaconfig = get_qa_config();
if(empty($qaconfig)) {

View File

@ -762,7 +762,7 @@ CREATE TABLE IF NOT EXISTS `g5_qa_content` (
`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` 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 '',