该问题已被锁定!
3
关注
3113
浏览

升级1.0时候执行?/upgrade/ 报错。无法升级

AI智能回复搜索中,请稍后...

为什么被折叠? 0 个回复被折叠
calmok 注册会员 用户来自于: 上海市
2012-07-27 17:53
1.0RC版本升级上来的
AWSupport 初级会员 用户来自于: 广东省深圳市
2012-07-27 17:53
什么版本升级上来的?
AWSupport 初级会员 用户来自于: 广东省深圳市
2012-07-27 18:07
首先在 phpmyadmin 里面手工执行 CREATE TABLE `aws_user_action_history_data` ( `history_id` int(11) unsigned NOT NULL, `associate_content` text, `associate_attached` text, PRIMARY KEY (`history_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `aws_user_action_history_data` ( `history_id` , `associate_content` , `associate_attached` ) SELECT `history_id` , `associate_content` , `associate_attached` FROM `aws_user_action_history`; ALTER TABLE `aws_user_action_history` DROP `associate_content`; ALTER TABLE `aws_user_action_history` DROP `associate_attached`; ALTER TABLE `aws_user_action_history` ADD `associate_attached` INT( 11 ) NULL DEFAULT NULL; ALTER TABLE `aws_user_action_history` DROP INDEX `associate_type`; ALTER TABLE `aws_user_action_history` ADD KEY `associate` (`associate_type`,`associate_action`); ALTER TABLE `aws_user_action_history` ADD KEY ( `add_time` ); ALTER TABLE `aws_user_action_history` ADD KEY ( `uid` ); ALTER TABLE `aws_user_action_history` ADD KEY ( `associate_attached` ); ALTER TABLE `aws_user_action_history` ADD KEY `associate_with_id` ( `associate_id`, `associate_type`, `associate_action` ); CREATE TABLE `aws_notification_data` ( `notification_id` int(11) unsigned NOT NULL, `data` text, PRIMARY KEY (`notification_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `aws_notification_data` ( `notification_id` , `data` ) SELECT `notification_id` , `data` FROM `aws_notification`; ALTER TABLE `aws_notification` DROP `data`; ALTER TABLE `aws_notification` ADD KEY `recipient_read_flag` (`recipient_uid`,`read_flag`); ALTER TABLE `aws_notification` ADD KEY `model` (`model_type`,`source_id`); ALTER TABLE `aws_user_action_history` CHANGE `associate_type` `associate_type` TINYINT( 1 ) NULL DEFAULT NULL COMMENT '关联类型: 1 问题 2 回答 3 评论 4 话题'; ALTER TABLE `aws_user_action_history` CHANGE `associate_action` `associate_action` SMALLINT( 3 ) NULL DEFAULT NULL COMMENT '操作类型'; ALTER TABLE `aws_users` ADD KEY ( `reputation` ); ALTER TABLE `aws_users` ADD KEY ( `reputation_update_time` ); ALTER TABLE `aws_users` ADD KEY ( `group_id` ); ALTER TABLE `aws_users` ADD KEY ( `agree_count` ); ALTER TABLE `aws_users` ADD KEY ( `thanks_count` ); ALTER TABLE `aws_users` ADD KEY ( `forbidden` ); ALTER TABLE `aws_users` ADD KEY ( `valid_email` ); ALTER TABLE `aws_reputation_topic` ADD KEY ( `topic_count` ); ALTER TABLE `aws_answer` ADD KEY ( `agree_count` ); ALTER TABLE `aws_answer` ADD KEY ( `against_count` ); ALTER TABLE `aws_answer` ADD KEY ( `add_time` ); ALTER TABLE `aws_question` ADD KEY ( `update_time` ); ALTER TABLE `aws_question` ADD KEY ( `add_time` ); ALTER TABLE `aws_question` ADD KEY ( `published_uid` ); ALTER TABLE `aws_question` ADD KEY ( `answer_count` ); ALTER TABLE `aws_question` ADD KEY ( `question_content` ); ALTER TABLE `aws_question_keyword` DROP INDEX `keyword`; ALTER TABLE `aws_question_keyword` ADD KEY ( `question_id` ); ALTER TABLE `aws_question_keyword` ADD KEY ( `keyword` ); ALTER TABLE `aws_notice` ADD KEY ( `dialog_id` ); ALTER TABLE `aws_notice_dialog` ADD KEY ( `recipient_uid` ); ALTER TABLE `aws_notice_dialog` ADD KEY ( `sender_uid` ); ALTER TABLE `aws_notice_dialog` ADD KEY ( `last_time` ); ALTER TABLE `aws_notice_recipient` ADD KEY ( `recipient_uid` ); ALTER TABLE `aws_notice_recipient` ADD KEY ( `sender_uid` ); ALTER TABLE `aws_notice_recipient` ADD KEY ( `notice_id` ); ALTER TABLE `aws_notice_recipient` ADD KEY ( `dialog_id` ); ALTER TABLE `aws_answer` ADD `force_fold` TINYINT( 1 ) NULL DEFAULT '0' COMMENT '强制折叠'; ALTER TABLE `aws_users_online` CHANGE `last_active` `last_active` INT( 11 ) NULL DEFAULT '0' COMMENT '上次活动时间'; ALTER TABLE `aws_users_online` CHANGE `ip` `ip` BIGINT( 12 ) NULL DEFAULT '0' COMMENT '客户端ip'; ALTER TABLE `aws_users_online` CHANGE `active_url` `active_url` VARCHAR( 255 ) NULL DEFAULT NULL COMMENT '停留页面'; ALTER TABLE `aws_users_online` CHANGE `user_agent` `user_agent` VARCHAR( 255 ) NULL DEFAULT NULL COMMENT '用户客户端信息'; ALTER TABLE `aws_topic_question` ADD KEY ( `topic_id` ); ALTER TABLE `aws_topic_focus` ADD KEY ( `topic_id` ); ALTER TABLE `aws_topic_focus` ADD KEY `topic_uid` ( `topic_id`, `uid` ); ALTER TABLE `aws_topic_experience` ADD KEY `topic_uid` ( `topic_id`, `uid` ); ALTER TABLE `aws_user_follow` ADD KEY `user_follow` ( `fans_uid`, `friend_uid` ); ALTER TABLE `aws_question_focus` ADD KEY `question_uid` ( `question_id`, `uid` ); ALTER TABLE `aws_answer_comments` ADD KEY ( `time` ); ALTER TABLE `aws_question_comments` ADD KEY ( `time` ); DELETE FROM `aws_notification` WHERE `action_type` IN (109, 112); 然后清空 app/upgrade/db/20120720.sql 文件里的内容, 再运行一下升级器
胡贵建 注册会员 用户来自于: 上海市浦东新区
2012-07-27 18:12
sdfsdfsdsafasd

关于作者

calmok 注册会员

这家伙很懒,还没有设置简介

问题动态

发布时间
2012-07-27 17:52
更新时间
2012-07-27 18:12
关注人数
3 人关注