begin;

alter table user add column  `daily_diamond_times` int(11) NOT NULL DEFAULT '0' COMMENT '兑换钻石次数';

DROP TABLE IF EXISTS `draw`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `draw` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'accountid',
  `id` int(11) NOT NULL DEFAULT '0' COMMENT '抽奖id',
  `cd_time`  int(11) NOT NULL DEFAULT '0' COMMENT 'cd时间',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`idx`),
  UNIQUE KEY `accountid_drawid` (`accountid`, `id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

insert into version (version) values(2021012901);

commit;
