#
# Run the query below on the postgresql database you give trafstats 
# access to.
#
CREATE TABLE rawtraffic (
	source_ip inet NOT NULL,
	source_port int4 DEFAULT 0,
	dest_ip inet NOT NULL,
	dest_port INT4 DEFAULT 0,
	timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
	amount int8 NOT NULL
);

#
# Replace 'trafstats' with the userID you created for trafstats to use
# the database as.
#
GRANT INSERT ON rawtraffic TO trafstats;
