fixing insertion into archive table upon delete