alter table jobs add remove_from_dashboard_date datetime null after closed_date;

update jobs
inner join invoices on jobs.id = invoices.job_id
set jobs.remove_from_dashboard_date = invoices.payment_date
where invoices.payment_date is not null;
