INSERT INTO `mydb`.`t_game_config` (`u_level`, `set_type`, `set_type_val`, `title`) VALUES ('0', 'event_charge_status', 'ON', '돌발충전 상태');
INSERT INTO `mydb`.`t_game_config` (`u_level`, `set_type`, `set_type_val`, `title`) VALUES ('0', 'event_charge_start', '18:00', '돌발충전 시작시간');
INSERT INTO `mydb`.`t_game_config` (`u_level`, `set_type`, `set_type_val`, `title`) VALUES ('0', 'event_changer_end', '23:00', '돌발충전 종료시간');

CREATE TABLE `charge_event` (
  `level` int(11) unsigned NOT NULL COMMENT '레벨 (1 ~ 10)',
  `bonus` int(11) unsigned NOT NULL DEFAULT 1000000 COMMENT '보너스(%)',
  PRIMARY KEY (`level`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='돌발충전 이벤트';

INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('1', '10');
INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('2', '10');
INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('3', '10');
INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('4', '10');
INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('5', '10');
INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('6', '10');
INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('7', '10');
INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('8', '10');
INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('9', '10');
INSERT INTO `mydb`.`charge_event` (`level`, `bonus`) VALUES ('10', '10');

ALTER TABLE `mydb`.`charge_event` 
ADD COLUMN `max_bonus` INT(11) NOT NULL DEFAULT 0 AFTER `bonus`;


UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '1');
UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '2');
UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '3');
UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '4');
UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '5');
UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '6');
UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '7');
UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '8');
UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '9');
UPDATE `mydb`.`charge_event` SET `max_bonus` = '100' WHERE (`level` = '10');
