

ALTER TABLE `member_bet` 
ADD COLUMN `lose_take_point` INT(11) NULL AFTER `is_classic`,
ADD COLUMN `lose_recom_take_point` INT(11) NULL AFTER `lose_take_point`;

CREATE TABLE `tb_static_rolling_comps` (
  `idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `create_dt` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `type` varchar(100) DEFAULT NULL COMMENT '"chex, 죽장\ncasino, 카지노 배팅,낙첨\nprematch, : 프리매치 베팅,낙첨\ninplay: 인플레이 배팅,낙첨\nclassic\npowerball:\npower_ladder:\nkino_ladder:\nvirtual_soccer:\nslot:\ne-sports:\nhash:"',
  `order_group` int(11) DEFAULT NULL COMMENT '열 그룹',
  `order` int(11) DEFAULT NULL,
  `column_name` varchar(100) DEFAULT NULL,
  `level` int(11) DEFAULT NULL,
  `myself_chex` int(11) DEFAULT NULL COMMENT '본인죽장',
  `recommender_chex` int(11) DEFAULT NULL,
  `myself_bet` int(11) DEFAULT NULL COMMENT '본인 배팅',
  `recommender_bet` int(11) DEFAULT NULL COMMENT '추천인_배팅',
  `myself_lose` int(11) DEFAULT NULL COMMENT '본인_낙첨',
  `recommender_lose` int(11) DEFAULT NULL COMMENT '추천인_낙첨',
  `desc` varchar(256) DEFAULT NULL COMMENT '상세 설명',
  `is_use` varchar(4) DEFAULT NULL COMMENT '오픈 여부',
  PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;


CREATE TABLE `tb_user_rolling_comps` (
  `member_idx` int(11) NOT NULL,
  `type` varchar(100) NOT NULL COMMENT '"chex, 죽장\\ncasino, 카지노 배팅,낙첨\\nprematch, : 프리매치 베팅,낙첨\\ninplay: 인플레이 배팅,낙첨\\nclassic\\npowerball:\\npower_ladder:\\nkeno_ladder:\\nvirtual_soccer:\\nslot:\\ne-sports:\\nhash:"',
  `bet_total` int(11) DEFAULT 0,
  `lose_bet_total` int(11) DEFAULT 0,
  `create_dt` timestamp NOT NULL DEFAULT current_timestamp(),
  `update_dt` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`member_idx`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

ALTER TABLE mini_game_member_bet 
ADD COLUMN recom_take_point INT(11) NULL DEFAULT 0 AFTER take_point,
ADD COLUMN lose_take_point INT(11) NULL DEFAULT 0 AFTER recom_take_point,
ADD COLUMN lose_recom_take_point INT(11) NULL DEFAULT 0 AFTER lose_take_point;

ALTER TABLE `tb_static_rolling_comps` 
CHANGE COLUMN `myself_chex` `myself_chex` DECIMAL(11,1) NULL DEFAULT NULL COMMENT '본인죽장' ,
CHANGE COLUMN `recommender_chex` `recommender_chex` DECIMAL(11,1) NULL DEFAULT NULL ,
CHANGE COLUMN `myself_bet` `myself_bet` DECIMAL(11,1) NULL DEFAULT NULL COMMENT '본인 배팅' ,
CHANGE COLUMN `recommender_bet` `recommender_bet` DECIMAL(11,1) NULL DEFAULT NULL COMMENT '추천인_배팅' ,
CHANGE COLUMN `myself_lose` `myself_lose` DECIMAL(11,1) NULL DEFAULT NULL COMMENT '본인_낙첨' ,
CHANGE COLUMN `recommender_lose` `recommender_lose` DECIMAL(11,1) NULL DEFAULT NULL COMMENT '추천인_낙첨' ;

