-- 登录登出日志字段修改
ALTER TABLE `log_login_logout` MODIFY COLUMN `power` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '战力' AFTER `lv`;


-- tyl
-- 高级藏宝图次数奖励
CREATE TABLE `treasure_map_montly_times` (
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '角色Id',
  `times` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '月度挖宝次数',
  `receive_list` varchar(500) NOT NULL DEFAULT '[]' COMMENT '已领取奖励次数',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='高级藏宝图次数奖励';

-- zmh
drop table if exists log_nucleon_lv;
CREATE TABLE `log_nucleon_lv` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '角色Id',
  `role_name` varchar(255) NOT NULL DEFAULT '' COMMENT '角色名称',
  `old_lv` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '旧等级',
  `new_lv` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '新等级',
  `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='灵能升级日志';

CREATE TABLE `log_nucleon_equip_evo` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '角色Id',
  `role_name` varchar(255) NOT NULL DEFAULT '' COMMENT '角色名称',
  `item` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '进化前',
  `next` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '进化后',
  `cost` varchar(500) NOT NULL DEFAULT '[]' COMMENT '消耗',
  `uid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '消耗道具',
  `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='灵能进化日志';


drop table if exists log_nucleon_equip_upgrade;
CREATE TABLE `log_nucleon_equip_upgrade` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '序号',
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  `name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '名称',
  `pos` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '槽位',
  `lv_before` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '前等级',
  `exp_before` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '前经验',
  `lv_after` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '后等级',
  `exp_after` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '后经验',
  `cost` varchar(500) NOT NULL DEFAULT '[]' COMMENT '消耗列表',
  `time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`),
  KEY `role_id` (`role_id`),
  KEY `name` (`name`),
  KEY `time` (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-灵装升级';

-- 社团竞速修改
ALTER TABLE guild_race_rank ADD COLUMN `time` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建时间' after `old_rank`;