Hoe kan ik de paginateller van de leaderboard plugin resetten?

AI-generated summary

In a support thread titled ‘How i can reset page counter of the leaderboard plugin?’, Bitweb_Core asks how to reset the leaderboard page counter after deleting test entries, which left gaps (pages 1 and 2 empty). Falco explains that the counter is managed by a PostgreSQL sequence, not a table, and must be reset via psql. Bitweb_Core confirms understanding but seeks clarification on which table or sequence to target. Falco reiterates it’s a sequence, not a table, and advises consulting PostgreSQL docs. Finally, Bitweb_Core shares the working solution: entering the app container, connecting to the PostgreSQL database, listing sequences with SELECT * FROM information_schema.sequences;, then resetting the relevant sequences using ALTER SEQUENCE gamification_leaderboards_id_seq RESTART WITH 1; and ALTER SEQUENCE gamification_scores_id_seq RESTART WITH 1;. Screenshots are included to illustrate the process and results.

​​
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.

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.

./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;