diff options
author | Yorhel <git@yorhel.nl> | 2020-10-15 16:02:23 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-10-15 16:04:22 +0200 |
commit | f0ba4719534608093c1b1cd7a2e34c392c86891e (patch) | |
tree | 889a65c13fd9eb2867f07c04a9841e73822c567e /util | |
parent | 7430acd68bf99585e461ef4fad4b40be45466d70 (diff) |
reviews: Allow anonymous voting + display overrule counting
Anonymous votes count for 0.01, regular votes for 1 and overrule votes
for 1000. It's a bit crude, but ought to do the job.
Reason for this change is that most reviews don't seem to get any votes
at all. With this anonymous voting we can do some sort of
scoring/ordering even with potentially less reliable votes.
Diffstat (limited to 'util')
-rw-r--r-- | util/updates/2020-10-15-reviews-anonymous-votes.sql | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/updates/2020-10-15-reviews-anonymous-votes.sql b/util/updates/2020-10-15-reviews-anonymous-votes.sql new file mode 100644 index 00000000..721543f6 --- /dev/null +++ b/util/updates/2020-10-15-reviews-anonymous-votes.sql @@ -0,0 +1,4 @@ +ALTER TABLE reviews_votes ADD COLUMN ip inet; +CREATE UNIQUE INDEX reviews_votes_id_ip ON reviews_votes (id,ip); +\i sql/func.sql +SELECT update_reviews_votes_cache(id) FROM reviews; |