fix the on_update on a foreign key