add game_cnt and match_cnt fields to bsk_users table
[brisk.git] / sql / sql.d / 071-apprentice.sql
index 376427b..eb905b7 100644 (file)
@@ -6,3 +6,11 @@ CREATE TABLE #PFX#selfreg_chk (
        ip         integer,                           -- ip v4 address
        atime      timestamp DEFAULT to_timestamp(0)  -- access time
        );
+
+--
+--  Add counters to show how many matches and games are played
+--
+ALTER TABLE #PFX#users DROP COLUMN match_cnt;
+ALTER TABLE #PFX#users ADD COLUMN match_cnt integer DEFAULT 0;
+ALTER TABLE #PFX#users DROP COLUMN game_cnt;
+ALTER TABLE #PFX#users ADD COLUMN game_cnt integer DEFAULT 0;