Add rank history table.
authorAnt Zucaro <azucaro@gmail.com>
Sun, 22 Jan 2012 17:31:50 +0000 (12:31 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 22 Jan 2012 17:31:50 +0000 (12:31 -0500)
build/build_full.sql
tables/player_ranks_history.tab [new file with mode: 0644]

index f419b56..0e7a848 100755 (executable)
@@ -1,4 +1,5 @@
 -- drop tables first in reverse order
+drop table if exists player_ranks cascade;
 drop table if exists player_elos cascade;
 drop table if exists player_nicks cascade;
 drop table if exists db_version cascade;
@@ -35,6 +36,7 @@ drop table if exists players cascade;
 \i tables/db_version.tab
 \i tables/player_nicks.tab
 \i tables/player_elos.tab
+\i tables/player_ranks.tab
 
 begin;
 
diff --git a/tables/player_ranks_history.tab b/tables/player_ranks_history.tab
new file mode 100644 (file)
index 0000000..970806f
--- /dev/null
@@ -0,0 +1,13 @@
+CREATE TABLE player_ranks_history
+(
+  player_id integer NOT NULL,
+  nick character varying(128),
+  game_type_cd character varying(10) NOT NULL,
+  elo numeric NOT NULL,
+  rank integer NOT NULL,
+  create_dt timestamp without time zone
+)
+WITH (
+  OIDS=FALSE
+);
+ALTER TABLE player_ranks OWNER TO xonstat;