]> git.xonotic.org Git - xonotic/xonstatdb.git/blobdiff - tables/player_game_anticheats.tab
Add an anticheat log table.
[xonotic/xonstatdb.git] / tables / player_game_anticheats.tab
diff --git a/tables/player_game_anticheats.tab b/tables/player_game_anticheats.tab
new file mode 100755 (executable)
index 0000000..54967e3
--- /dev/null
@@ -0,0 +1,20 @@
+CREATE TABLE xonstat.player_game_anticheats\r
+(\r
+  player_game_anticheat_id bigserial NOT NULL,\r
+  player_id integer NOT NULL,\r
+  game_id bigint NOT NULL,\r
+  key character varying(128),\r
+  value numeric,\r
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),\r
+  CONSTRAINT player_game_anticheats_pk PRIMARY KEY (player_game_anticheat_id),\r
+  CONSTRAINT player_game_anticheats_fk01 FOREIGN KEY (player_id)\r
+      REFERENCES players (player_id) MATCH SIMPLE\r
+      ON UPDATE NO ACTION ON DELETE NO ACTION\r
+)\r
+WITH (\r
+  OIDS=FALSE\r
+);\r
+\r
+CREATE INDEX player_game_anticheats_ix01 on player_game_anticheats(game_id);\r
+CREATE INDEX player_game_anticheats_ix02 on player_game_anticheats(player_id);\r
+ALTER TABLE xonstat.player_game_anticheats OWNER TO xonstat;\r