From: Ant Zucaro Date: Mon, 16 Jun 2014 01:05:07 +0000 (-0400) Subject: Add groups table for admin functionality. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=70a9ae97d08409d12aaecb82c3ff95079eb9b35e;p=xonotic%2Fxonstatdb.git Add groups table for admin functionality. --- 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;