ALTER TABLE `rooms101_rtsdev`.`payments`
    ADD COLUMN `trans_id` int(0) NULL AFTER `paytype`;

ALTER TABLE `rooms101_rtsdev`.`payments`
    MODIFY COLUMN `paymentDate` datetime NOT NULL AFTER `paymentAmount`,
    MODIFY COLUMN `trans_id` varchar(20) NULL DEFAULT NULL AFTER `paytype`;

ALTER TABLE `rooms101_rtsdev`.`payments`
    MODIFY COLUMN `paymentAmount` decimal(9, 2) NULL DEFAULT 0.00 AFTER `paymentDueAmount`,
    MODIFY COLUMN `paymentDate` datetime NULL AFTER `paymentAmount`,
    MODIFY COLUMN `authnumber` varchar(80) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '0' AFTER `sales_status`,
    MODIFY COLUMN `ccnumber` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `trans_id`,
    MODIFY COLUMN `ccmonth` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `ccnumber`,
    MODIFY COLUMN `ccyear` char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `ccmonth`,
    MODIFY COLUMN `cccv2` varchar(4) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `ccyear`,
    MODIFY COLUMN `commissionpaid` tinyint(4) NULL DEFAULT 0 AFTER `cccv2`,
    MODIFY COLUMN `checkroutenum` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `commissionpaid`,
    MODIFY COLUMN `checkacctnum` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `checkroutenum`,
    MODIFY COLUMN `checknum` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `checkacctnum`,
    MODIFY COLUMN `billingname` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `checknum`,
    MODIFY COLUMN `billingaddress` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `billingname`,
    MODIFY COLUMN `billingzip` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '' AFTER `billingaddress`;
