update obpm2.tenant_department_employee_relations a inner join obpm2.tenant_departments b on a.department_id = b.id
set a.department_index_tree = b.index_tree
where a.department_index_tree != b.index_tree;