]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blobdiff - scripts/update_elos.sql
Use a new Elo rot scheme.
[xonotic/xonstatdb.git] / scripts / update_elos.sql
index 087f21361e5f5f46ff581c2c15aa9cd23c54e0a5..38d456d8aa2eabd5ba03500b5612a9b3ccd0cef0 100644 (file)
@@ -1,5 +1,6 @@
 begin;
   update player_elos
-  set elo=greatest(elo-1, 100.00)
-  where update_dt < (current_timestamp at time zone 'UTC' - interval '30 days');
+  set elo=greatest(100, elo - ((current_date - (update_dt::date)-31)/7))
+  where update_dt < (current_timestamp at time zone 'UTC' - interval '30 days')
+  and elo != 100;
 end;