Null out prev_block_id to avoid constraint error deleting block.