]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blobdiff - scripts/update_elos.sql
Damn off-by-one errors. *shakes fist*
[xonotic/xonstatdb.git] / scripts / update_elos.sql
index 38d456d8aa2eabd5ba03500b5612a9b3ccd0cef0..f724e0313935a10826dbc785216900560ca670ac 100644 (file)
@@ -1,6 +1,6 @@
 begin;
   update player_elos
-  set elo=greatest(100, elo - ((current_date - (update_dt::date)-31)/7))
+  set elo=greatest(100, elo - ((current_date - (update_dt::date)-31)/7+1))
   where update_dt < (current_timestamp at time zone 'UTC' - interval '30 days')
   and elo != 100;
 end;