alter table company add column timezone varchar(40);
update company set timezone = (select timezone from zonetab where isocode = (select country.isocode from company c left join country on country.id = c.country where c.id = company.id) limit 1) where company.timezone IS NULL;
alter table company alter column timezone set default '';
alter table company alter column timezone set not NULL;

