SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';

CREATE  TABLE IF NOT EXISTS `violet-viettel`.`tblpaidlog` (
  `paid_id` BIGINT(11) NOT NULL AUTO_INCREMENT ,
  `us_id` INT(11) NOT NULL ,
  `paid_type` TINYINT(11) NOT NULL DEFAULT 0 COMMENT '1:SMS; 2:CARD;' ,
  `amount` INT(11) NOT NULL DEFAULT 0 ,
  `paid_time` DATETIME,
  PRIMARY KEY (`paid_id`) )
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;

DROP TABLE IF EXISTS `violet-viettel`.`tbluserpaylog` ;

ALTER TABLE `violet-viettel`.`tbladmin` CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;

ALTER TABLE `violet-viettel`.`tbladminrole` CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;

ALTER TABLE `violet-viettel`.`tblcollaborator` CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;

ALTER TABLE `violet-viettel`.`tbluser` CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;

ALTER TABLE `violet-viettel`.`tblsmstemplate` ADD COLUMN `commandcode` VARCHAR(45) NULL DEFAULT NULL  AFTER `reponse_url` , ADD COLUMN `service_id` VARCHAR(45) NULL DEFAULT NULL  AFTER `reponse_url` , CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;

ALTER TABLE `violet-viettel`.`tblwebservice` CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;

ALTER TABLE `violet-viettel`.`tblsmslog` CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;

ALTER TABLE `violet-viettel`.`tblcardlog` CHARACTER SET = utf8 , COLLATE = utf8_general_ci ;


SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;