alter table ACCOUNTING_TRANSACTION add column PAYMENT_MODE varchar(100) NULL;
alter table ACCOUNTING_TRANSACTION add column WHEN_PROCESSED datetime NULL;

update ACCOUNTING_TRANSACTION set PAYMENT_MODE = 'CASH' WHERE PAYMENT_MODE IS NULL;
update ACCOUNTING_TRANSACTION set WHEN_PROCESSED = WHEN_REGISTED WHERE WHEN_PROCESSED IS NULL;

alter table ACCOUNTING_TRANSACTION change column PAYMENT_MODE PAYMENT_MODE varchar(100) NOT NULL;
alter table ACCOUNTING_TRANSACTION change column WHEN_PROCESSED WHEN_PROCESSED datetime NOT NULL default '0000-00-00 00:00:00';
alter table ACCOUNTING_TRANSACTION change column WHEN_REGISTED WHEN_REGISTERED datetime NOT NULL default '0000-00-00 00:00:00';


