-- 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;
\i tables/summary_stats.tab
\i tables/team_game_stats.tab
\i tables/player_game_anticheats.tab
+\i tables/player_groups.tab
begin;
--- /dev/null
+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;