给整数添加默认值

This commit is contained in:
wangwei01 2019-07-26 11:31:42 +08:00
parent a0b5efdba5
commit 5e3efbf78f

View File

@ -41,22 +41,22 @@ CREATE TABLE `user` (
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`user_name` tinyblob COMMENT '用户名字',
`avatar_url` varchar(256) NOT NULL DEFAULT '' COMMENT '用户头像',
`game_times` int(11) NOT NULL COMMENT '游戏场次',
`win_times` int(11) NOT NULL COMMENT '胜场',
`kills` int(11) NOT NULL COMMENT '所有击杀',
`harm` int(11) NOT NULL COMMENT '所有伤害',
`game_times` int(11) NOT NULL DEFAULT '0' COMMENT '游戏场次',
`win_times` int(11) NOT NULL DEFAULT '0' COMMENT '胜场',
`kills` int(11) NOT NULL DEFAULT '0' COMMENT '所有击杀',
`harm` int(11) NOT NULL DEFAULT '0' COMMENT '所有伤害',
`score` bigint NOT NULL COMMENT '积分',
`coin_num` bigint NOT NULL COMMENT '角色金币',
`diamond_num` bigint NOT NULL COMMENT '角色钻石',
`kill_his` int(11) NOT NULL COMMENT '最高击杀',
`harm_his` int(11) NOT NULL COMMENT '最高伤害',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`first_fight` int(11) NOT NULL COMMENT '是否是第一次战斗',
`collect_status` int(11) NOT NULL COMMENT '收藏状态',
`keys_num` int(11) NOT NULL COMMENT '钥匙数量',
`battle_re_times` int(11) NOT NULL COMMENT '每日战斗奖励次数',
`shop_flush_times` int(11) NOT NULL COMMENT '每日商店刷新次数',
`kill_his` int(11) NOT NULL DEFAULT '0' COMMENT '最高击杀',
`harm_his` int(11) NOT NULL DEFAULT '0' COMMENT '最高伤害',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
`first_fight` int(11) NOT NULL DEFAULT '0' COMMENT '是否是第一次战斗',
`collect_status` int(11) NOT NULL DEFAULT '0' COMMENT '收藏状态',
`keys_num` int(11) NOT NULL DEFAULT '0' COMMENT '钥匙数量',
`battle_re_times` int(11) NOT NULL DEFAULT '0' COMMENT '每日战斗奖励次数',
`shop_flush_times` int(11) NOT NULL DEFAULT '0' COMMENT '每日商店刷新次数',
`kefu_status` int(11) NOT NULL COMMENT '客服奖励状态(0:未领取,1:已领取)',
`free_getbox` int(11) NOT NULL COMMENT '每日免费获得宝箱次数',
PRIMARY KEY (`idx`),
@ -73,16 +73,16 @@ DROP TABLE IF EXISTS `commander`;
CREATE TABLE `commander` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`commander_id` int(11) NOT NULL COMMENT '指挥官id',
`commander_status` int(11) NOT NULL COMMENT '指挥官状态0:上阵中,1:已获得,2:未获得)',
`fragment_id` int(11) NOT NULL COMMENT '碎片id',
`fragment_num` int(11) NOT NULL COMMENT '碎片数量',
`commander_type` int(11) NOT NULL COMMENT '指挥官类型',
`commander_level` int(11) NOT NULL COMMENT '指挥官等级',
`experience_level` int(11) NOT NULL COMMENT '指挥官体验等级',
`commander_id` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官id',
`commander_status` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官状态0:上阵中,1:已获得,2:未获得)',
`fragment_id` int(11) NOT NULL DEFAULT '0' COMMENT '碎片id',
`fragment_num` int(11) NOT NULL DEFAULT '0' COMMENT '碎片数量',
`commander_type` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官类型',
`commander_level` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官等级',
`experience_level` int(11) NOT NULL DEFAULT '0' COMMENT '指挥官体验等级',
`active_time` varchar(50) NOT NULL DEFAULT '有效时间',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `commander_uuid` (`accountid`, `commander_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@ -98,16 +98,16 @@ DROP TABLE IF EXISTS `tank`;
CREATE TABLE `tank` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`tank_id` int(11) NOT NULL COMMENT '坦克id',
`tank_status` int(11) NOT NULL COMMENT '坦克状态0:上阵中,1:已获得,2:未获得)',
`tank_level` int(11) NOT NULL COMMENT '坦克等级',
`fragment_id` int(11) NOT NULL COMMENT '碎片id',
`fragment_num` int(11) NOT NULL COMMENT '碎片数量',
`experience_level` int(11) NOT NULL COMMENT '坦克体验等级',
`experience_type` int(11) NOT NULL COMMENT '坦克体验类型',
`tank_id` int(11) NOT NULL DEFAULT '0' COMMENT '坦克id',
`tank_status` int(11) NOT NULL DEFAULT '0' COMMENT '坦克状态0:上阵中,1:已获得,2:未获得)',
`tank_level` int(11) NOT NULL DEFAULT '0' COMMENT '坦克等级',
`fragment_id` int(11) NOT NULL DEFAULT '0' COMMENT '碎片id',
`fragment_num` int(11) NOT NULL DEFAULT '0' COMMENT '碎片数量',
`experience_level` int(11) NOT NULL DEFAULT '0' COMMENT '坦克体验等级',
`experience_type` int(11) NOT NULL DEFAULT '0' COMMENT '坦克体验类型',
`active_time` varchar(50) NOT NULL DEFAULT '有效时间',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `tank_uuid` (`accountid`, `tank_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@ -123,10 +123,10 @@ DROP TABLE IF EXISTS `skin`;
CREATE TABLE `skin` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`skin_id` int(11) NOT NULL COMMENT '皮肤id',
`skin_status` int(11) NOT NULL COMMENT '皮肤状态0:上阵中,1:已获得,2:未获得)',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤id',
`skin_status` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤状态0:上阵中,1:已获得,2:未获得)',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `skin_uuid` (`accountid`, `skin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@ -164,8 +164,8 @@ CREATE TABLE `hang` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`hang_time` varchar(50) NOT NULL DEFAULT '领取时间',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@ -181,12 +181,12 @@ DROP TABLE IF EXISTS `quest`;
CREATE TABLE `quest` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`quest_id` int(11) NOT NULL COMMENT '任务id',
`quest_num` int(11) NOT NULL COMMENT '任务进度',
`quest_type` int(11) NOT NULL COMMENT '任务类型',
`quest_state` int(11) NOT NULL COMMENT '任务状态',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`quest_id` int(11) NOT NULL DEFAULT '0' COMMENT '任务id',
`quest_num` int(11) NOT NULL DEFAULT '0' COMMENT '任务进度',
`quest_type` int(11) NOT NULL DEFAULT '0' COMMENT '任务类型',
`quest_state` int(11) NOT NULL DEFAULT '0' COMMENT '任务状态',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `quest_uuid` (`accountid`, `quest_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@ -201,10 +201,10 @@ DROP TABLE IF EXISTS `active`;
CREATE TABLE `active` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`active_num` int(11) NOT NULL COMMENT '日活跃度',
`active_num` int(11) NOT NULL DEFAULT '0' COMMENT '日活跃度',
`num_time` varchar(50) NOT NULL DEFAULT '日活跃度时间',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid` (`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@ -221,18 +221,18 @@ CREATE TABLE `history_record`(
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`room_uuid` varchar(60) NOT NULL DEFAULT '' COMMENT '战斗id',
`map_id` int(11) NOT NULL COMMENT '地图id',
`map_id` int(11) NOT NULL DEFAULT '0' COMMENT '地图id',
`map_tpl_name` varchar(50) NOT NULL DEFAULT '' COMMENT '地图模板名字',
`map_name` varchar(50) DEFAULT '' COMMENT '地图名字',
`game_time` int(11) NOT NULL COMMENT '游戏完成时间',
`rank` int(11) NOT NULL COMMENT '游戏排名',
`kills` int(11) NOT NULL COMMENT '游戏击杀',
`harms` int(11) NOT NULL COMMENT '游戏伤害',
`hurts` int(11) NOT NULL COMMENT '承受伤害',
`game_time` int(11) NOT NULL DEFAULT '0' COMMENT '游戏完成时间',
`rank` int(11) NOT NULL DEFAULT '0' COMMENT '游戏排名',
`kills` int(11) NOT NULL DEFAULT '0' COMMENT '游戏击杀',
`harms` int(11) NOT NULL DEFAULT '0' COMMENT '游戏伤害',
`hurts` int(11) NOT NULL DEFAULT '0' COMMENT '承受伤害',
`coin` bigint NOT NULL COMMENT '战斗结算金币',
`status` int(11) NOT NULL COMMENT '结算金币领取状态',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '结算金币领取状态',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `history_record_uuid` (`accountid`, `room_uuid`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
@ -247,10 +247,10 @@ DROP TABLE IF EXISTS `share_achievement`;
CREATE TABLE `share_achievement` (
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`ach_id` int(11) NOT NULL COMMENT '分享邀请成就id',
`status` int(11) NOT NULL COMMENT '状态(0:未领取,1:已领取)',
`create_time` int(11) NOT NULL COMMENT '创建时间',
`modify_time` int(11) NOT NULL COMMENT '修改时间',
`ach_id` int(11) NOT NULL DEFAULT '0' COMMENT '分享邀请成就id',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '状态(0:未领取,1:已领取)',
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid_ach_id` (`accountid`, `ach_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;