downforacross / downforacross.com

Web frontend for downforacross.com -- continuation of stevenhao/crosswordsio
https://downforacrosscom.downforacross1.now.sh
MIT License
229 stars 90 forks source link

[PostgresPuzzleList 3/N] Add solved stats to new puzzle list #153

Closed ewmson closed 3 years ago

ewmson commented 3 years ago

Adds in the solved count for the puzzle list.

This makes a denormalized column on puzzles to get the number of solves and logs to it whenever someone does a solve.

Depends on https://github.com/downforacross/downforacross.com/pull/151 so will also have those changes until that one is merged (let me know if there is a better way to have these broken up pull requests with dependencies).

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/downforacross/downforacrosscom/7ftpm2m7p
✅ Preview: https://downforacrosscom-git-fork-ewmson-postgrespuzzlesolvedstats.downforacross1.vercel.app

stevenhao commented 3 years ago

Created the table in staging and prod via

psql < create_puzzle_solves.sql
psql < add_times_solved_1_24_21.sql
ppsql < create_puzzle_solves.sql
ppsql < add_times_solved_1_24_21.sql
# ppsql: aliased to PGDATABASE="production" psql

after some changes to the ts, I was able to test this via devbackendprod. It's working!

image

stevenhao commented 3 years ago

Wrap-up:

This PR has been fully deployed to downforacross.com.

Thanks @ewmson for this contribution! This is huge!

stevenhao commented 3 years ago

https://github.com/downforacross/downforacross.com/commit/56b99f3a923dde428fca562b7cf3d72f794b916f fix here