From 70a9ae97d08409d12aaecb82c3ff95079eb9b35e Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Sun, 15 Jun 2014 21:05:07 -0400 Subject: [PATCH] Add groups table for admin functionality. --- build/build_full.sql | 2 ++ tables/player_groups.tab | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tables/player_groups.tab diff --git a/build/build_full.sql b/build/build_full.sql index 6e2bba5..fe60827 100755 --- a/build/build_full.sql +++ b/build/build_full.sql @@ -1,4 +1,5 @@ -- drop tables first in reverse order +drop table if exists player_groups; drop table if exists player_game_anticheats; drop table if exists team_game_stats; drop table if exists summary_stats cascade; @@ -51,6 +52,7 @@ drop table if exists players cascade; \i tables/summary_stats.tab \i tables/team_game_stats.tab \i tables/player_game_anticheats.tab +\i tables/player_groups.tab begin; diff --git a/tables/player_groups.tab b/tables/player_groups.tab new file mode 100644 index 0000000..d401f39 --- /dev/null +++ b/tables/player_groups.tab @@ -0,0 +1,14 @@ +CREATE TABLE xonstat.player_groups +( + player_id integer NOT NULL, + group_name character varying(30) NOT NULL, + create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'), + CONSTRAINT player_groups_pk PRIMARY KEY (player_id, group_name), + CONSTRAINT player_groups_fk001 FOREIGN KEY (player_id) + REFERENCES xonstat.players (player_id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +) +WITH ( + OIDS=FALSE +); +ALTER TABLE xonstat.player_groups OWNER TO xonstat; -- 2.39.2