ALTER TABLE `paymentmethod` ADD COLUMN `bankCode` varchar(30) NOT NULL DEFAULT '' AFTER `sequence`;
ALTER TABLE `paymentmethod` ADD COLUMN `isSystemDefault` tinyint(1) NOT NULL DEFAULT 0 AFTER `bankCode`;
ALTER TABLE `paymentmethod` ADD INDEX(`bankCode`);
ALTER TABLE `paymentmethod` ADD INDEX(`isSystemDefault`);

update `paymentmethod`
set isSystemDefault = 1
where active = 1
and usingFor <> 'BOTH';

ALTER TABLE `ecommerceinfo` ADD COLUMN `xeroPaymentSyncWay` varchar(10) NULL DEFAULT '' AFTER `xeroToken`;
ALTER TABLE `ecommerceinfo` ADD INDEX(`xeroPaymentSyncWay`);
