Permalink
Browse files

修复数据库全文查询索引错误

  • Loading branch information...
fengkaijia committed Sep 22, 2017
1 parent 4235f1a commit 6ea373db1af7fed1ef3f29aca743e2a4542632d2
Showing with 5 additions and 1 deletion.
  1. +1 −1 resource/install.sql
  2. +4 −0 resource/upgrade_23_24.sql
@@ -356,7 +356,7 @@ CREATE TABLE IF NOT EXISTS `{IP_PREFIX}user_option` (
UNIQUE KEY `option_user` (`user`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户设置';

ALTER TABLE `{IP_PREFIX}knowledgebase` ADD FULLTEXT KEY `knowledgebase_content` (`content`);
ALTER TABLE `{IP_PREFIX}knowledgebase` ADD FULLTEXT KEY `knowledgebase_content` (`title`,`content`);

INSERT INTO `{IP_PREFIX}option` (`name`, `value`) VALUES
('organization', '\"\"'), -- 组织名称
@@ -0,0 +1,4 @@
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

ALTER TABLE `{IP_PREFIX}knowledgebase` DROP INDEX `knowledgebase_content`, ADD FULLTEXT `knowledgebase_content` (`title`, `content`);

0 comments on commit 6ea373d

Please sign in to comment.