]> git.rm.cloudns.org Git - xonotic/xonstatdb.git/commitdiff
Add ranks table for batch purposes.
authorAnt Zucaro <azucaro@gmail.com>
Sun, 22 Jan 2012 03:49:43 +0000 (22:49 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 22 Jan 2012 03:49:43 +0000 (22:49 -0500)
tables/player_ranks.tab [new file with mode: 0644]

diff --git a/tables/player_ranks.tab b/tables/player_ranks.tab
new file mode 100644 (file)
index 0000000..6bcd2df
--- /dev/null
@@ -0,0 +1,18 @@
+CREATE TABLE xonstat.player_ranks
+(
+  player_id integer NOT NULL,
+  game_type_cd character varying(10) NOT NULL,
+  elo numeric NOT NULL,
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
+  CONSTRAINT player_ranks_pk PRIMARY KEY (player_id, game_type_cd),
+  CONSTRAINT player_ranks_fk01 FOREIGN KEY (player_id)
+      REFERENCES xonstat.players (player_id) MATCH SIMPLE
+      ON UPDATE NO ACTION ON DELETE NO ACTION,
+  CONSTRAINT player_ranks_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_ranks OWNER TO xonstat;