]> git.rm.cloudns.org Git - xonotic/xonstatdb.git/commitdiff
Add elo rot script.
authorAnt Zucaro <azucaro@gmail.com>
Sun, 2 Dec 2012 19:30:49 +0000 (14:30 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 2 Dec 2012 19:30:49 +0000 (14:30 -0500)
scripts/update_elos.sql [new file with mode: 0644]

diff --git a/scripts/update_elos.sql b/scripts/update_elos.sql
new file mode 100644 (file)
index 0000000..1665dd2
--- /dev/null
@@ -0,0 +1,5 @@
+begin;
+  update player_elos
+  set elo=least(elo-1, 100.00)
+  where update_dt < (current_timestamp at time zone 'UTC' - interval '30 days');
+end;