alter table astium add column zapchanged varchar(3);
update astium set zapchanged = 'no' where zapchanged IS NULL;
alter table astium alter column zapchanged set NOT NULL;
alter table astium alter column zapchanged set default 'no';
alter table astium add constraint astium_zapchanged CHECK (zapchanged IN ('yes','no', 'act'));

alter table astium add column fw_on varchar(3);
update astium set fw_on = 'no' where fw_on IS NULL;
alter table astium alter column fw_on set NOT NULL;
alter table astium alter column fw_on set default 'no';
alter table astium add constraint astium_fw_on CHECK (fw_on IN ('yes','no'));

alter table astium add column hostname varchar(128);
update astium set hostname = '' where hostname IS NULL;
alter table astium alter column hostname set NOT NULL;
alter table astium alter column hostname set default '';

alter table astium add column password varchar(16);
update astium set password = '' where password IS NULL;
alter table astium alter column password set NOT NULL;
alter table astium alter column password set default '';

alter table astium add column ipaddress varchar(15);
update astium set ipaddress = '' where ipaddress IS NULL;
alter table astium alter column ipaddress set NOT NULL;
alter table astium alter column ipaddress set default '';

alter table astium add column state varchar(24);
update astium set state = 'UNKNOWN' where state IS NULL;
alter table astium alter column state set NOT NULL;
alter table astium alter column state set default 'UNKNOWN';

delete from astglobals where name = 'zapchanged';
delete from astglobals where name = 'fw_on';

