]> git.xonotic.org Git - xonotic/xonstatdb.git/commitdiff
Misc fixes.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 28 Apr 2011 02:43:39 +0000 (22:43 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 28 Apr 2011 02:43:39 +0000 (22:43 -0400)
tables/games.tab
tables/player_game_stats.tab

index 21e357e32ed8d9774d85b78434472aadfb1c8fb9..c2e3056eb5d3de74b161d7c154c431ce951939da 100644 (file)
@@ -22,4 +22,59 @@ CREATE TABLE xonstat.games
 WITH (
   OIDS=FALSE
 );
+CREATE INDEX games_ix001 on games(create_dt);
 ALTER TABLE xonstat.games OWNER TO xonstat;
+
+CREATE TABLE xonstat.games_2011Q2 (
+    CHECK ( create_dt >= DATE '2011-04-01' AND create_dt < DATE '2011-07-01' ) 
+) INHERITS (games);
+CREATE INDEX games_2011Q2_ix001 on games_2011Q2(create_dt);
+ALTER TABLE xonstat.games_2011Q2 OWNER TO xonstat;
+
+CREATE TABLE xonstat.games_2011Q3 ( 
+    CHECK ( create_dt >= DATE '2011-07-01' AND create_dt < DATE '2011-10-01' ) 
+) INHERITS (games);
+CREATE INDEX games_2011Q3_ix001 on games_2011Q3(create_dt);
+ALTER TABLE xonstat.games_2011Q3 OWNER TO xonstat;
+
+CREATE TABLE xonstat.games_2011Q4 ( 
+    CHECK ( create_dt >= DATE '2011-10-01' AND create_dt < DATE '2012-01-01' ) 
+) INHERITS (games);
+CREATE INDEX games_2011Q4_ix001 on games_2011Q4(create_dt);
+ALTER TABLE xonstat.games_2011Q4 OWNER TO xonstat;
+
+CREATE TABLE xonstat.games_2012Q1 ( 
+    CHECK ( create_dt >= DATE '2012-01-01' AND create_dt < DATE '2012-04-01' ) 
+) INHERITS (games);
+CREATE INDEX games_2012Q1_ix001 on games_2012Q1(create_dt);
+ALTER TABLE xonstat.games_2012Q1 OWNER TO xonstat;
+
+CREATE TABLE xonstat.games_2012Q2 ( 
+    CHECK ( create_dt >= DATE '2012-04-01' AND create_dt < DATE '2012-07-01' ) 
+) INHERITS (games);
+CREATE INDEX games_2012Q2_ix001 on games_2012Q2(create_dt);
+ALTER TABLE xonstat.games_2012Q2 OWNER TO xonstat;
+
+CREATE TABLE xonstat.games_2012Q3 ( 
+    CHECK ( create_dt >= DATE '2012-07-01' AND create_dt < DATE '2012-10-01' ) 
+) INHERITS (games);
+CREATE INDEX games_2012Q3_ix001 on games_2012Q3(create_dt);
+ALTER TABLE xonstat.games_2012Q3 OWNER TO xonstat;
+
+CREATE TABLE xonstat.games_2012Q4 ( 
+    CHECK ( create_dt >= DATE '2012-10-01' AND create_dt < DATE '2013-01-01' ) 
+) INHERITS (games);
+CREATE INDEX games_2012Q4_ix001 on games_2012Q4(create_dt);
+ALTER TABLE xonstat.games_2012Q4 OWNER TO xonstat;
+
+CREATE TABLE xonstat.games_2013Q1 ( 
+    CHECK ( create_dt >= DATE '2013-01-01' AND create_dt < DATE '2013-04-01' ) 
+) INHERITS (games);
+CREATE INDEX games_2013Q1_ix001 on games_2013Q1(create_dt);
+ALTER TABLE xonstat.games_2013Q1 OWNER TO xonstat;
+
+CREATE TABLE xonstat.games_2013Q2 ( 
+    CHECK ( create_dt >= DATE '2013-04-01' AND create_dt < DATE '2013-07-01' ) 
+) INHERITS (games);
+CREATE INDEX games_2013Q2_ix001 on games_2013Q2(create_dt);
+ALTER TABLE xonstat.games_2013Q2 OWNER TO xonstat;
index 19da7ff2a4cf099e008e0b8e366637e8dc2a1eec..d7ec40ef17512576ff6b0cc501cd7cc146eb8413 100644 (file)
@@ -35,4 +35,59 @@ CREATE TABLE xonstat.player_game_stats
 WITH (
   OIDS=FALSE
 );
+CREATE INDEX player_game_stats_ix01 on player_game_stats(create_dt);
 ALTER TABLE xonstat.player_game_stats OWNER TO xonstat;
+
+CREATE TABLE xonstat.player_game_stats_2011Q2 (
+    CHECK ( create_dt >= DATE '2011-04-01' AND create_dt < DATE '2011-07-01' ) 
+) INHERITS (player_game_stats);
+CREATE INDEX player_game_stats_2011Q2_ix01 on player_game_stats_2011Q2(create_dt);
+ALTER TABLE xonstat.player_game_stats_2011Q2 OWNER TO xonstat;
+
+CREATE TABLE xonstat.player_game_stats_2011Q3 ( 
+    CHECK ( create_dt >= DATE '2011-07-01' AND create_dt < DATE '2011-10-01' ) 
+) INHERITS (player_game_stats);
+CREATE INDEX player_game_stats_2011Q3_ix01 on player_game_stats_2011Q3(create_dt);
+ALTER TABLE xonstat.player_game_stats_2011Q3 OWNER TO xonstat;
+
+CREATE TABLE xonstat.player_game_stats_2011Q4 ( 
+    CHECK ( create_dt >= DATE '2011-10-01' AND create_dt < DATE '2012-01-01' ) 
+) INHERITS (player_game_stats);
+CREATE INDEX player_game_stats_2011Q4_ix01 on player_game_stats_2011Q4(create_dt);
+ALTER TABLE xonstat.player_game_stats_2011Q4 OWNER TO xonstat;
+
+CREATE TABLE xonstat.player_game_stats_2012Q1 ( 
+    CHECK ( create_dt >= DATE '2012-01-01' AND create_dt < DATE '2012-04-01' ) 
+) INHERITS (player_game_stats);
+CREATE INDEX player_game_stats_2012Q1_ix01 on player_game_stats_2012Q1(create_dt);
+ALTER TABLE xonstat.player_game_stats_2012Q1 OWNER TO xonstat;
+
+CREATE TABLE xonstat.player_game_stats_2012Q2 ( 
+    CHECK ( create_dt >= DATE '2012-04-01' AND create_dt < DATE '2012-07-01' ) 
+) INHERITS (player_game_stats);
+CREATE INDEX player_game_stats_2012Q2_ix01 on player_game_stats_2012Q2(create_dt);
+ALTER TABLE xonstat.player_game_stats_2012Q2 OWNER TO xonstat;
+
+CREATE TABLE xonstat.player_game_stats_2012Q3 ( 
+    CHECK ( create_dt >= DATE '2012-07-01' AND create_dt < DATE '2012-10-01' ) 
+) INHERITS (player_game_stats);
+CREATE INDEX player_game_stats_2012Q3_ix01 on player_game_stats_2012Q3(create_dt);
+ALTER TABLE xonstat.player_game_stats_2012Q3 OWNER TO xonstat;
+
+CREATE TABLE xonstat.player_game_stats_2012Q4 ( 
+    CHECK ( create_dt >= DATE '2012-10-01' AND create_dt < DATE '2013-01-01' ) 
+) INHERITS (player_game_stats);
+CREATE INDEX player_game_stats_2012Q4_ix01 on player_game_stats_2012Q4(create_dt);
+ALTER TABLE xonstat.player_game_stats_2012Q4 OWNER TO xonstat;
+
+CREATE TABLE xonstat.player_game_stats_2013Q1 ( 
+    CHECK ( create_dt >= DATE '2013-01-01' AND create_dt < DATE '2013-04-01' ) 
+) INHERITS (player_game_stats);
+CREATE INDEX player_game_stats_2013Q1_ix01 on player_game_stats_2013Q1(create_dt);
+ALTER TABLE xonstat.player_game_stats_2013Q1 OWNER TO xonstat;
+
+CREATE TABLE xonstat.player_game_stats_2013Q2 ( 
+    CHECK ( create_dt >= DATE '2013-04-01' AND create_dt < DATE '2013-07-01' ) 
+) INHERITS (player_game_stats);
+CREATE INDEX player_game_stats_2013Q2_ix01 on player_game_stats_2013Q2(create_dt);
+ALTER TABLE xonstat.player_game_stats_2013Q2 OWNER TO xonstat;