From 6e5b29bcf22715dcf2bb641926ed42d7ef5917af Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Tue, 19 Dec 2017 13:58:59 -0500 Subject: [PATCH] Add Glicko table definitions. --- tables/player_glickos_base.tab | 23 +++++++++++++++++++++++ tables/player_glickos_current.tab | 23 +++++++++++++++++++++++ tables/player_glickos_queue.tab | 11 +++++++++++ 3 files changed, 57 insertions(+) create mode 100755 tables/player_glickos_base.tab create mode 100755 tables/player_glickos_current.tab create mode 100755 tables/player_glickos_queue.tab diff --git a/tables/player_glickos_base.tab b/tables/player_glickos_base.tab new file mode 100755 index 0000000..aa4a83a --- /dev/null +++ b/tables/player_glickos_base.tab @@ -0,0 +1,23 @@ +CREATE TABLE xonstat.player_glickos_base +( + player_id integer NOT NULL, + game_type_cd character varying(10) NOT NULL, + category character varying(10) NOT NULL default 'general', + mu numeric NOT NULL, + phi numeric NOT NULL, + sigma numeric NOT NULL, + active_ind boolean NOT NULL default true, + create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), + update_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), + CONSTRAINT player_glickos_base_pk PRIMARY KEY (player_id, game_type_cd, category), + CONSTRAINT player_glickos_fk01 FOREIGN KEY (player_id) + REFERENCES xonstat.players (player_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT player_glickos_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_glickos_base OWNER TO xonstat; diff --git a/tables/player_glickos_current.tab b/tables/player_glickos_current.tab new file mode 100755 index 0000000..5eceaba --- /dev/null +++ b/tables/player_glickos_current.tab @@ -0,0 +1,23 @@ +CREATE TABLE xonstat.player_glickos_current +( + player_id integer NOT NULL, + game_type_cd character varying(10) NOT NULL, + category character varying(10) NOT NULL default 'general', + mu numeric NOT NULL, + phi numeric NOT NULL, + sigma numeric NOT NULL, + active_ind boolean NOT NULL default true, + create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), + update_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), + CONSTRAINT player_glickos_current_pk PRIMARY KEY (player_id, game_type_cd, category), + CONSTRAINT player_glickos_fk01 FOREIGN KEY (player_id) + REFERENCES xonstat.players (player_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT player_glickos_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_glickos_current OWNER TO xonstat; diff --git a/tables/player_glickos_queue.tab b/tables/player_glickos_queue.tab new file mode 100755 index 0000000..e6a0320 --- /dev/null +++ b/tables/player_glickos_queue.tab @@ -0,0 +1,11 @@ +CREATE TABLE xonstat.player_glickos_queue +( + game_id bigint NOT NULL, + create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), + update_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), + CONSTRAINT player_glickos_queue_pk PRIMARY KEY (game_id) +) +WITH ( + OIDS=FALSE +); +ALTER TABLE xonstat.player_glickos_queue OWNER TO xonstat; -- 2.39.2