How i can reset page counter of the leaderboard plugin?

​​
How i can reset page counter of the leaderboard plugin?

If that need do at db , is there some plugin to explore db , for not attach to docker container and do all with cmd via postgres db cli ?

This what i mean

i was delete 2 test leaderboards and now count start from 3 :neutral_face: ,1 and 2 is empty pages.

Like the topic, user and post IDs those are always increasing and backed by a PostgreSQL sequence.

You will need to drop into a psql shell in order to reset it.

2 Likes

i undestand that , but qustion i need simple drop it at

public | gamification_leaderboards            | table | discourse

or some where else to need clear ?

( problem , i cannot find table where that value is )

Its not in a table but in a sequence, which is the mechanism PostgreSQL uses to store auto incrementing IDs for primary keys.

PostgreSQL docs should cover this operation.

2 Likes
./launcher enter app
sudo -u postgres psql discourse

for list all

SELECT * FROM information_schema.sequences;
ALTER SEQUENCE gamification_leaderboards_id_seq RESTART WITH 1;
ALTER SEQUENCE gamification_scores_id_seq RESTART WITH 1;

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.