Leaderboard rank returns null after upgrade — existing leaderboards not respecting enableRank

I am currently using the ListLeaderboardRecordsAroundOwnerAsync function in Unity to retrieve the player’s own rank. After upgrading the Nakama version, the player’s rank started returning null. I found the related bug and changed the enableRank value to true, and newly created leaderboards correctly return ranks. However, the existing leaderboards still do not return rank values.

Is there any way to configure enableRank for existing leaderboards, or to temporarily back up the data from the existing leaderboard and migrate it to a newly created leaderboard?

Hi @GunWoo-KOR,

To change the enableRanks flag for an existing leaderboard, you have to use some custom sql:

UPDATE leaderboard SET enable_ranks = true WHERE id = <leaderboard_id>

and restart the server, so that the rank cache can be primed.

Best.