DROP DATABASE IF EXISTS WebProvider;
DROP USER  'WebProvider'@'localhost';
DROP USER  'PCSInfo'@'localhost';
CREATE DATABASE WebProvider;
CREATE USER 'WebProvider'@'localhost' IDENTIFIED BY '.WebProvider';
CREATE USER 'PCSInfo'@'localhost'  IDENTIFIED BY 'Pcs30066';
GRANT ALL on WebProvider.* to 'WebProvider'@'localhost';
GRANT ALL on WebProvider.* to 'PCSInfo'@'localhost';
USE WebProvider;
CREATE TABLE `bkgtasks` (
  `ID` int(6) NOT NULL AUTO_INCREMENT,
  `STATUS` varchar(1) NOT NULL DEFAULT 'A',
  `PRIO` int(9) DEFAULT '0',
  `CLEAN_AT` TIMESTAMP DEFAULT 0,
  `ACTIVATE_TIME` TIMESTAMP DEFAULT 0,
  `RETRY_COUNT` tinyint(3) DEFAULT 5,
  `RETRY_PAUSE` int(5) DEFAULT 30,
  `CREATE_TIME` TIMESTAMP DEFAULT NOW(),
  `TASK_TYPE` char(2),
  `TASK_INFO_KEY` char(20),
  `TASK_INFO_DATA` BINARY(60),
  PRIMARY KEY (`ID`),
  INDEX (STATUS),
  INDEX (PRIO),
  INDEX (ACTIVATE_TIME),
  INDEX (RETRY_COUNT)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
