CREATE TABLE xonstat.player_game_stats ( player_game_stat_id bigserial NOT NULL, player_id integer NOT NULL, game_id bigint NOT NULL, stat_type character varying(1), nick character varying(64), team integer, kills integer, deaths integer, suicides integer, score integer, "time" interval, held interval, captures integer, pickups integer, drops integer, "returns" integer, collects integer, destroys integer, destroys_holding_key integer, pushes integer, pushed integer, carrier_frags integer, create_dt timestamp with time zone NOT NULL, CONSTRAINT player_game_stats_pk PRIMARY KEY (player_game_stat_id), CONSTRAINT player_game_stats_fk001 FOREIGN KEY (player_id) REFERENCES xonstat.players (player_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT player_game_stats_fk002 FOREIGN KEY (game_id) REFERENCES xonstat.games (game_id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION, CONSTRAINT player_game_stats_uk001 UNIQUE (player_id, game_id, stat_type) ) WITH ( OIDS=FALSE ); ALTER TABLE xonstat.player_game_stats OWNER TO xonstat;