-- tyl
-- 性格系统增加宝箱采集控制
ALTER TABLE role_nature ADD COLUMN `collect_times` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0' COMMENT '宝箱采集次数' AFTER `overflow_value`;

-- 修改宠物系统
DROP TABLE IF EXISTS pet_support_statistics;
ALTER TABLE role_pet DROP COLUMN `pet_stage`, DROP COLUMN `is_follow`;
ALTER TABLE pet_support_info DROP COLUMN `support_type`;

DROP TABLE IF EXISTS `pet_support_rank`;
CREATE TABLE `pet_support_rank` (
  `pet_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '宠物Id',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '今日投票榜战力头名角色Id',
  `support_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '今日投票数',
  `yest_role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '昨日榜战力头名玩家Id',
  `yest_support_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '宠物昨天的投票人数',
  `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '时间戳',
  PRIMARY KEY (`pet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='宠物全服支援排行榜数据表';

CREATE TABLE IF NOT EXISTS `pet_vote_info` (
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '角色Id',
  `vote_count` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '投票次数',
  `pet_list` varchar(255) NOT NULL DEFAULT '[]' COMMENT '投票的宠物列表',
  `receive_pet_list` varchar(255) NOT NULL DEFAULT '[]' COMMENT '已领取奖励宠物列表',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='宠物投票信息';