CREATE TABLE `member_level` (
  `level` tinyint DEFAULT 0,
  `money` int DEFAULT 0,
  PRIMARY KEY (`level`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

INSERT INTO `member_level` (`level`, `money`) VALUES ('1', '0');
INSERT INTO `member_level` (`level`, `money`) VALUES ('2', '10000');
INSERT INTO `member_level` (`level`, `money`) VALUES ('3', '100000');
INSERT INTO `member_level` (`level`, `money`) VALUES ('4', '1000000');
INSERT INTO `member_level` (`level`, `money`) VALUES ('5', '10000000');

ALTER TABLE `fee_setting` 
ADD COLUMN `member_idx` BIGINT NULL DEFAULT 0 AFTER `idx`;

INSERT INTO `mydb`.`fee_setting` (`member_idx`, `level`, `name`, `charge_limit_amount`, `refund_limit_amount`, `send_limit_amount`, `chare_fee`, `refund_fee_min`, `refund_fee_max`, `send_limit_fee_min`, `send_limit_fee_max`, `refund_is_use`, `send_is_use`) VALUES ('0', '2', '정회원', '1000', '1000000', '1000', '500.00', '1000', '1.50', '500', '1.50', 'max', 'max');
INSERT INTO `mydb`.`fee_setting` (`member_idx`, `level`, `name`, `charge_limit_amount`, `refund_limit_amount`, `send_limit_amount`, `chare_fee`, `refund_fee_min`, `refund_fee_max`, `send_limit_fee_min`, `send_limit_fee_max`, `refund_is_use`, `send_is_use`) VALUES ('0', '3', 'VIP', '1000', '1000000', '1000', '500.00', '1000', '1.50', '500', '1.50', 'max', 'max');
INSERT INTO `mydb`.`fee_setting` (`member_idx`, `level`, `name`, `charge_limit_amount`, `refund_limit_amount`, `send_limit_amount`, `chare_fee`, `refund_fee_min`, `refund_fee_max`, `send_limit_fee_min`, `send_limit_fee_max`, `refund_is_use`, `send_is_use`) VALUES ('0', '4', 'VVIP', '1000', '1000000', '1000', '500.00', '1000', '1.50', '500', '1.50', 'max', 'max');
INSERT INTO `mydb`.`fee_setting` (`member_idx`, `level`, `name`, `charge_limit_amount`, `refund_limit_amount`, `send_limit_amount`, `chare_fee`, `refund_fee_min`, `refund_fee_max`, `send_limit_fee_min`, `send_limit_fee_max`, `refund_is_use`, `send_is_use`) VALUES ('0', '5', 'SVIP', '1000', '1000000', '1000', '500.00', '1000', '1.50', '500', '1.50', 'max', 'max');

ALTER TABLE `mydb`.`t_adm_user` 
CHANGE COLUMN `is_main_stat` `is_main_stat` VARCHAR(45) NULL DEFAULT '1' COMMENT '상황판 값을 보여줄지 말지 여부(0-off, 1-on)' ,
CHANGE COLUMN `grade` `grade` TINYINT NULL DEFAULT '1' COMMENT '1 : 일반관리자  ,2 : 슈퍼관리자 ' ;

ALTER TABLE `mydb`.`member` 
CHANGE COLUMN `second_password` `second_password` VARCHAR(512) NULL DEFAULT NULL COMMENT '환전 비밀 번호 ' ;


-- 20220710
ALTER TABLE `log_db`.`t_log_cash` 
ADD COLUMN `dis_id` VARCHAR(20) NULL DEFAULT '' AFTER `recv_id`,
ADD COLUMN `nick_name` VARCHAR(20) NULL DEFAULT '' AFTER `dis_id`,
ADD COLUMN `fee` DECIMAL(10,2) NULL DEFAULT 0 AFTER `af_point`;
