-- liushl
CREATE TABLE `equipment_collect` (
  `role_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '玩家ID',
  `series` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '套数',
  `color` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '品质',
  `active` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '激活进度',
  `collect` varchar(200) NOT NULL DEFAULT '[]' COMMENT '收集的装备',
  PRIMARY KEY (`role_id`,`series`,`color`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='装备收集##合服保留';


-- 跨服分区相关表
-- huangyongxing
-- 2020-07-23
-- 调整表字段text为varchar
-- 修改center_zones分区表，去除联合主键形式，改为分区id单一主键
ALTER TABLE `center_reg_svr` MODIFY `m_server_ids` varchar(5000) NOT NULL COMMENT '游戏服合服列表';
TRUNCATE TABLE `center_zones`;
ALTER TABLE `center_zones`
  MODIFY `server_ids` varchar(2000) NOT NULL COMMENT '游戏主服server_id列表',
  ADD COLUMN `zone_id` int(11) NOT NULL COMMENT '分区id' FIRST,
  DROP PRIMARY KEY,
  DROP COLUMN `center_id`,
  DROP COLUMN `main_reg_order`,
  ADD PRIMARY KEY (`zone_id`);

-- 跨服分区-再分区数据
CREATE TABLE `center_rezone_info` (
  `zone_id` int(11) unsigned NOT NULL COMMENT '游戏服id',
  `zone_id_2` int(11) unsigned NOT NULL COMMENT '游戏服id2',
  `next_stage` tinyint(3) unsigned NOT NULL COMMENT '下一分区阶段',
  `svr_factions` varchar(6000) NOT NULL COMMENT '分区各服阵营信息',
  `scheduled_time` int(11) unsigned NOT NULL COMMENT '计划正式分区时间',
  `confirm` tinyint(3) unsigned NOT NULL COMMENT '分区计划是否已确认过 ',
  PRIMARY KEY (`zone_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='跨服分区-再分区数据';

-- ljy
CREATE TABLE `god_lottery_role` (
  `role_id` bigint(20) NOT NULL,
  `counts` int(11) NOT NULL DEFAULT '0' COMMENT '抽奖次数',
  `blessing` int(11) NOT NULL DEFAULT '0' COMMENT '累计值',
  `counts_award` varchar(1000) NOT NULL DEFAULT '[]' COMMENT '保底奖励',
  `bless_award` varchar(1000) NOT NULL DEFAULT '' COMMENT '累计奖励',
  `time` int(11) NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='唤神限时抽奖信息';

CREATE TABLE `god_normal_lottery` (
  `role_id` bigint(20) NOT NULL,
  `phase` smallint(5) NOT NULL DEFAULT '0' COMMENT '期数',
  `blessing` int(11) NOT NULL DEFAULT '0' COMMENT '累计值',
  `bless_award` varchar(1000) NOT NULL DEFAULT '[]' COMMENT '累计奖励',
  `time` int(11) NOT NULL DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='唤神普通抽奖信息';

CREATE TABLE `log_god_lottery` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '序号',
  `role_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '玩家ID',
  `pool_type` tinyint(2) NOT NULL DEFAULT '0' COMMENT '类型##1普通召唤/2限时召唤',
  `phase` smallint(4) NOT NULL DEFAULT '0' COMMENT '期数',
  `god_id` smallint(4) NOT NULL DEFAULT '0' COMMENT '主题唤神',
  `op_type` tinyint(2) NOT NULL DEFAULT '0' COMMENT '操作##1单抽/2十连抽/3祝福值奖励/4次数奖励',
  `add_blessing` int(11) NOT NULL DEFAULT '0' COMMENT '增加祝福值',
  `blessing` int(11) NOT NULL DEFAULT '0' COMMENT '当前祝福值',
  `counts` int(11) NOT NULL DEFAULT '0' COMMENT '总抽奖次数',
  `cost` varchar(500) NOT NULL DEFAULT '[]' COMMENT '消耗',
  `award` varchar(5000) NOT NULL DEFAULT '[]' COMMENT '奖励',
  `time` int(11) unsigned DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=308 DEFAULT CHARSET=utf8 COMMENT='唤神抽奖日志';
