DROP TABLE IF EXISTS stsmq;
CREATE TABLE `stsmq` (
  `uniq` int(10) NOT NULL AUTO_INCREMENT,
  `portal` varchar(10) NOT NULL DEFAULT 'invalid',
  `status` varchar(10) NOT NULL DEFAULT 'invalid',
  `command` varchar(12) NOT NULL DEFAULT 'invalid',
  `edsn` varchar(20) NOT NULL DEFAULT '00000000000',
  `amount` double(16,2) NOT NULL DEFAULT '0.00',
  `request_dt` datetime NOT NULL DEFAULT '1970-01-01 00:00:01',
  `key_type` int(10) NOT NULL DEFAULT '1',
  `sgc` varchar(6) NOT NULL DEFAULT '000000',
  `ti` varchar(3) NOT NULL DEFAULT '01',
  `krn` int(2) NOT NULL DEFAULT '1',
  `ken` int(3) NOT NULL DEFAULT '255',
  `base_date` int(4) NOT NULL DEFAULT '1993',
  `tid` datetime NOT NULL DEFAULT '1970-01-01 00:00:01',
  `token1` varchar(20) DEFAULT NULL,
  `token2` varchar(20) DEFAULT NULL,
  `complete_dt` datetime DEFAULT NULL,
  `lastmod` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`uniq`),
  KEY `portal` (`portal`) USING BTREE,
  KEY `request_dt` (`request_dt`) USING BTREE,
  KEY `edsn` (`edsn`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
