ALTER TABLE dtb_mail_history ADD COLUMN sent_status SMALLINT ; UPDATE dtb_mail_history SET sent_status = 0 WHERE sent_status IS NULL ; ALTER TABLE dtb_mail_history ALTER COLUMN sent_status SET NOT NULL ;
ALTER TABLE dtb_mail_history ADD COLUMN sent_status SMALLINT ; UPDATE dtb_mail_history SET sent_status = 0 WHERE sent_status IS NULL ; ALTER TABLE dtb_mail_history ALTER COLUMN sent_status SET NOT NULL ;