Browse files

Add an active indicator to player_elo.

This will allow me to disable the ranking of players without
disabling the entire player record. This is to be applied
in cases where players have cheated more than once but don't
warrant a full kickban. Instead I can now make their record
essentially harmless with respect to everyone else.
  • Loading branch information...
1 parent 638dfbd commit 6644084b01153e52ced3d9fd2d24ed5f3f6c2c60 @antzucaro committed Jun 11, 2012
Showing with 4 additions and 2 deletions.
  1. +3 −2 scripts/update_ranks.sql
  2. +1 −0 tables/
@@ -12,7 +12,8 @@ begin;
over (partition by pe.game_type_cd order by pe.elo desc)
from players p, player_elos pe
where p.player_id = pe.player_id
- and p.active_ind = 'Y'
- and > 32;
+ and p.active_ind = True
+ and pe.active_ind = True
+ and >= 32;
@@ -4,6 +4,7 @@ CREATE TABLE xonstat.player_elos
game_type_cd character varying(10) NOT NULL,
games integer NOT NULL default 0,
elo numeric NOT NULL,
+ active_ind boolean NOT NULL default true,
create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
CONSTRAINT player_elos_pk PRIMARY KEY (player_id, game_type_cd),
CONSTRAINT player_elos_fk01 FOREIGN KEY (player_id)

0 comments on commit 6644084

Please sign in to comment.