Fix torrent table upgrade