added external_id to layer and updated rake task