-- liushl
CREATE TABLE `log_equipment_strength` (
  `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 '名称',
  `series` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '装备套数',
  `equip_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '装备类型',
  `goods_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '物品ID',
  `goods_type_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '装备ID',
  `result` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '强化结果##1成功;0失败',
  `lv_before` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '强化前等级',
  `lv_after` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '强化后等级',
  `ratio` 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 goods_type_id(`goods_type_id`),
  KEY time(`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-装备强化';

CREATE TABLE `log_equipment_great` (
  `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 '名称',
  `series` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '装备套数',
  `equip_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '装备类型',
  `goods_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '物品ID',
  `goods_type_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '装备ID',
  `result` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '进化结果##1成功;0失败',
  `great_before` varchar(500) NOT NULL DEFAULT '[]' COMMENT '进化前属性',
  `great_after` varchar(500) NOT NULL DEFAULT '[]' COMMENT '进化后属性',
  `ratio` 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 goods_type_id(`goods_type_id`),
  KEY time(`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-装备进化';

CREATE TABLE `log_equipment_empower` (
  `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 '名称',
  `equip_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '装备位置',
  `lv_before` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '操作前等级',
  `lv_after` tinyint(2) 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='日志-装备器灵';

CREATE TABLE `log_equipment_inherit` (
  `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 '名称',
  `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '继承类型##1手动继承;2自动继承',
  `goods_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '物品ID',
  `goods_type_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '装备ID',
  `cost_equipment` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '消耗装备ID',
  `attr_after` varchar(500) NOT NULL DEFAULT '[]' COMMENT '继承后属性',
  `attr_before` 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 goods_type_id(`goods_type_id`),
  KEY time(`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-装备继承';

CREATE TABLE `log_equipment_gems` (
  `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 '名称',
  `type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '操作类型##1镶嵌;2摘除;3升级',
  `series` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '装备套数',
  `equip_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '装备位置',
  `goods_id_before` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作前宝石ID##无为0',
  `goods_id_after` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作后宝石ID##无为0',
  `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='日志-装备宝石';



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',
  `opty` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '操作类型0升级1进阶',
  `name` varchar(50) NOT NULL DEFAULT '[]' COMMENT '名称',
  `equip_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '装备ID',
  `goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '物品ID',
  `lv_before` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '前等级',
  `lv_after` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '后等级',
  `exp_before` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '前经验',
  `exp_after` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '后经验',
  `goods_id_after` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '进阶后ID',
  `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 goods_id(`goods_id`),
  KEY time(`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='日志-灵装升级';



ALTER TABLE `guild_boss`
MODIFY COLUMN `flag`  int(11) NOT NULL DEFAULT 0 COMMENT '社团旗帜' AFTER `gid`;

