alter table astiumcdr add column chrg_num varchar(24);
update astiumcdr set chrg_num = '' where chrg_num IS NULL;
alter table astiumcdr alter column chrg_num set not null;
alter table astiumcdr alter column chrg_num set default '';

alter table astiumcdr add column chrg_name varchar(24);
update astiumcdr set chrg_name = '' where chrg_name IS NULL;
alter table astiumcdr alter column chrg_name set not null;
alter table astiumcdr alter column chrg_name set default '';

alter table astiumcdr add column chrg_type varchar(12);
update astiumcdr set chrg_type = '' where chrg_type IS NULL;
alter table astiumcdr alter column chrg_type set not null;
alter table astiumcdr alter column chrg_type set default '';

alter table astiumcdr add column chrg_id integer;
update astiumcdr set chrg_id = '1' where chrg_id IS NULL;
alter table astiumcdr alter column chrg_id set not null;
alter table astiumcdr alter column chrg_id set default '1';

alter table astiumcdr add column chrg_company integer;
update astiumcdr set chrg_company = '1' where chrg_company IS NULL;
alter table astiumcdr alter column chrg_company set not null;
alter table astiumcdr alter column chrg_company set default '1';

alter table astiumcdr add column chrg_department integer;
update astiumcdr set chrg_department = '1' where chrg_department IS NULL;
alter table astiumcdr alter column chrg_department set not null;
alter table astiumcdr alter column chrg_department set default '1';

alter table astiumcdr add column chrg_contact integer;
update astiumcdr set chrg_contact = '1' where chrg_contact IS NULL;
alter table astiumcdr alter column chrg_contact set not null;
alter table astiumcdr alter column chrg_contact set default '1';

CREATE INDEX astiumcdr_chrg_company_index ON astiumcdr (chrg_company);
CREATE INDEX astiumcdr_chrg_department_index ON astiumcdr (chrg_department);
CREATE INDEX astiumcdr_chrg_contact_index ON astiumcdr (chrg_contact);


