ThinkSAAS1.99手动升级到2.0

更新时间:2013-10-12 12:30:34
Version 2.0
新增功能
. 增加后台用户留言管理
. 增加后台消息管理
. 增加淘贴管理,完善帖子专辑功能
. 增加任务模块
. 增加积分兑换
. 积分完善,积分全部后台配置
. 编辑器更换为umeditor(百度迷你编辑器)
. 增加单附件的删除
. 增加文章TAG功能和TAG检索
. 增加后台配置是否开启前台验证码
. 增加后台管理删除动态
. 优化搜索增加文章搜索

优化修复
. 修复提交内容提示后记录消失的问题
. 完善mobile手机web应用
. 修复qq登陆验证错误问题
. 修复个别环境下带有中文Url无法识别的问题
. 更换最新的uploadify上传插件
. 更新图片上传和附件上传
. 修复回复评论的csrf漏洞
. 修复加入和退出小组的csrf漏洞
. 修正微博分页链接错误
. 统一和优化数据库和规范数据库表名命名
. 修复后台换肤功能
. 修复后台插件删除不了的问题
【重要】使用php7开启过opcache功能的请关闭后再继续升级,因为opcache的缓存会导致php代码更新不及时。(未开启opcache的请忽略)
第一步:下载升级包
第二步:升级数据库脚本
注意:如果修改过表前缀 ts_ 的,请把脚本中带有 ts_ 前缀的修改为自己的数据表前缀
ALTER TABLE `ts_attach` CHANGE `attachname` `attachname` CHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '附件名字';
--------------------
ALTER TABLE `ts_user_info` DROP `thems_other`;
--------------------
RENAME TABLE `ts_group_cates` TO `ts_group_cate` ;
--------------------
RENAME TABLE `ts_group_topics_type` TO `ts_group_topic_type` ;
--------------------
RENAME TABLE `ts_group_topics_edit` TO `ts_group_topic_edit` ;
--------------------
RENAME TABLE `ts_group_topics_comments` TO `ts_group_topic_comment` ;
--------------------
RENAME TABLE `ts_group_topics_collects` TO `ts_group_topic_collect` ;
--------------------
RENAME TABLE `ts_group_topics_add` TO `ts_group_topic_add` ;
--------------------
RENAME TABLE `ts_group_topics` TO `ts_group_topic` ;
--------------------
RENAME TABLE `ts_group_users` TO `ts_group_user` ;
--------------------
ALTER TABLE `ts_group_topic`
DROP `appkey`,
DROP `appname`,
DROP `appaction`,
DROP `appid`,
DROP `path`,
DROP `photo`,
DROP `photoshow`,
DROP `attach`,
DROP `attachname`,
DROP `attachshow`,
DROP `attachscore`,
DROP `music`,
DROP `video`,
DROP `color`;
--------------------
ALTER TABLE `ts_group` CHANGE `groupicon` `photo` CHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '小组图标';
--------------------
ALTER TABLE `ts_group` DROP `groupname_en`;
--------------------
ALTER TABLE `ts_group_topic` DROP `isshow`;
--------------------
CREATE TABLE `ts_redeem_cate` (
`cateid` int(11) NOT NULL AUTO_INCREMENT COMMENT '分类ID' ,
`catename` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分类名称' ,
PRIMARY KEY (`cateid`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
CHECKSUM=0
ROW_FORMAT=Fixed
DELAY_KEY_WRITE=0
;
--------------------
CREATE TABLE `ts_redeem_goods` (
`goodsid` int(11) NOT NULL AUTO_INCREMENT COMMENT '产品ID' ,
`cateid` int(11) NOT NULL DEFAULT 0 COMMENT '分类ID' ,
`title` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '产品标题' ,
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '产品介绍' ,
`nums` int(11) NOT NULL DEFAULT 0 COMMENT '数量' ,
`scores` int(11) NOT NULL DEFAULT 0 COMMENT '需要积分' ,
`return` int(11) NOT NULL DEFAULT 0 COMMENT '返还积分' ,
`endtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '结束时间' ,
`path` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '路径' ,
`photo` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图片' ,
`addtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '添加时间' ,
PRIMARY KEY (`goodsid`)
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
CHECKSUM=0
ROW_FORMAT=Dynamic
DELAY_KEY_WRITE=0
;
--------------------
CREATE TABLE `ts_redeem_user` (
`userid` int(11) NOT NULL DEFAULT 0 COMMENT '用户ID' ,
`goodsid` int(11) NOT NULL DEFAULT 0 COMMENT '产品ID' ,
`isreturn` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否返还0未返还1返还' ,
INDEX `userid` (`userid`, `goodsid`) USING BTREE ,
INDEX `userid_2` (`userid`) USING BTREE ,
INDEX `goodsid` (`goodsid`) USING BTREE
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
CHECKSUM=0
ROW_FORMAT=Fixed
DELAY_KEY_WRITE=0
;
--------------------
CREATE TABLE `ts_task` (
`taskid` int(11) NOT NULL AUTO_INCREMENT COMMENT '任务ID' ,
`taskkey` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务标识' ,
`title` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务标题' ,
`content` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务介绍' ,
`addtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '时间' ,
PRIMARY KEY (`taskid`),
UNIQUE INDEX `taskkey` (`taskkey`) USING BTREE
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
CHECKSUM=0
ROW_FORMAT=Dynamic
DELAY_KEY_WRITE=0
;
--------------------
CREATE TABLE `ts_task_user` (
`userid` int(11) NOT NULL DEFAULT 0 COMMENT '用户ID' ,
`taskkey` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务key' ,
`addtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '时间' ,
UNIQUE INDEX `userid` (`userid`, `taskkey`) USING BTREE ,
INDEX `taskkey` (`taskkey`) USING BTREE ,
INDEX `userid_2` (`userid`) USING BTREE
)
ENGINE=MyISAM
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
CHECKSUM=0
ROW_FORMAT=Fixed
DELAY_KEY_WRITE=0
;
--------------------
TRUNCATE `ts_user_score`;
--------------------
ALTER TABLE `ts_user_score` ADD COLUMN `app` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'APP' AFTER `scorename`;
--------------------
ALTER TABLE `ts_user_score` ADD COLUMN `action` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'ACTION' AFTER `app`;
--------------------
ALTER TABLE `ts_user_score` ADD COLUMN `ts` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'TS' AFTER `action`;
--------------------
ALTER TABLE `ts_user_score` ADD COLUMN `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0加积分1减积分' AFTER `score`;
--------------------
CREATE UNIQUE INDEX `app` ON `ts_user_score`(`app`, `action`, `ts`) USING BTREE ;
--------------------
INSERT INTO `ts_user_score` (`scoreid`, `scorekey`, `scorename`, `app`, `action`, `ts`, `score`, `status`) VALUES
(1, 'user_register', '用户注册', 'user', 'register', 'do', 100, 0),
(2, 'user_login', '用户登陆', 'user', 'login', 'do', 10, 0),
(3, 'group_topic_add', '发帖', 'group', 'add', 'do', 10, 0),
(4, 'group_topic_comment', '回帖', 'group', 'comment', 'do', 10, 0);
第三步:上传升级文件
解压第一步下载的 2.0.zip 压缩包,得到2.0目录,将2.0目录下的文件上传覆盖到您安装的thinksaas网站目录下
恭喜!升级完成。