Add player Elo support.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 31 Dec 2011 22:46:11 +0000 (17:46 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 31 Dec 2011 22:46:11 +0000 (17:46 -0500)
tables/player_elos.tab [new file with mode: 0755]

diff --git a/tables/player_elos.tab b/tables/player_elos.tab
new file mode 100755 (executable)
index 0000000..0c0e024
--- /dev/null
@@ -0,0 +1,19 @@
+CREATE TABLE xonstat.player_elos
+(
+  player_id integer NOT NULL,
+  game_type_cd character varying(10) NOT NULL,
+  games integer NOT NULL default 0,
+  elo numeric NOT NULL,
+  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)
+      REFERENCES xonstat.players (player_id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION,
+  CONSTRAINT player_elos_fk02 FOREIGN KEY (game_type_cd)
+      REFERENCES xonstat.cd_game_type (game_type_cd) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION
+)
+WITH (
+  OIDS=FALSE
+);
+ALTER TABLE xonstat.player_elos OWNER TO xonstat;