Durations to jobs

and need to create job_histories for existing jobs

insert into job_histories (company_id, duration, ....) select ... from jobs inner join builds where  ...