BEGIN;

alter table dahdi_channel add column answeronpolarityswitch varchar(3);
alter table dahdi_channel alter column answeronpolarityswitch set default 'yes';
update dahdi_channel set answeronpolarityswitch = 'yes' where answeronpolarityswitch is null;
alter table dahdi_channel alter column answeronpolarityswitch set not null;

alter table dahdi_channel add column hanguponpolarityswitch varchar(3);
alter table dahdi_channel alter column hanguponpolarityswitch set default 'yes';
update dahdi_channel set hanguponpolarityswitch = 'yes' where hanguponpolarityswitch is null;
alter table dahdi_channel alter column hanguponpolarityswitch set not null;

COMMIT;

