From 32ac8e3fe4d0d14b568206e1a17790b631d9a2bc Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Mon, 20 Feb 2012 11:42:21 -0500 Subject: [PATCH] Support deactivating players. --- scripts/update_ranks.sql | 1 + tables/players.tab | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/update_ranks.sql b/scripts/update_ranks.sql index 2fcd64c..77c7c79 100644 --- a/scripts/update_ranks.sql +++ b/scripts/update_ranks.sql @@ -12,6 +12,7 @@ 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 pe.games > 32; end; diff --git a/tables/players.tab b/tables/players.tab index b75a53a..26c212a 100644 --- a/tables/players.tab +++ b/tables/players.tab @@ -4,6 +4,7 @@ CREATE TABLE xonstat.players nick character varying(128), stripped_nick character varying(128), "location" character varying(100), + active_ind boolean NOT NULL default true, create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), CONSTRAINT players_pk PRIMARY KEY (player_id) ) -- 2.39.2