ALTER TABLE `transaction` ADD `companyMarginRate` DECIMAL(18, 4) NULL DEFAULT NULL AFTER `grandTotal`; 
ALTER TABLE `transaction` ADD `companyMarginAmount` DECIMAL(18, 4) NULL DEFAULT NULL AFTER `companyMarginRate`; 
ALTER TABLE `transaction` ADD `investorMarginRate` DECIMAL(18, 4) NULL DEFAULT NULL AFTER `companyMarginAmount`; 
ALTER TABLE `transaction` ADD `investorMarginAmount` DECIMAL(18, 4) NULL DEFAULT NULL AFTER `investorMarginRate`; 
ALTER TABLE `transaction` ADD `paymentType` VARCHAR(50) NULL DEFAULT NULL AFTER `investorMarginAmount`; 

UPDATE `transaction` SET `paymentType` = 'AMORTIZATION' WHERE `paymentType` IS NULL; 