summaryrefslogtreecommitdiff
path: root/pmacct/dbSetupCustom.mysql
blob: 9cc8f6b4b22075c06f66b64fc21ad0894b406687 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
drop database if exists pmacct;
create database pmacct;
use pmacct;

drop table if exists acct;
create table acct (
	ip_src CHAR(15) NOT NULL,
	ip_dst CHAR(15) NOT NULL,
	src_port INT(2) UNSIGNED NOT NULL,
	dst_port INT(2) UNSIGNED NOT NULL,
	packets INT UNSIGNED NOT NULL,
	bytes BIGINT UNSIGNED NOT NULL,
	stamp_inserted DATETIME NOT NULL,
	stamp_updated DATETIME,
	PRIMARY KEY (ip_src, ip_dst, src_port, dst_port, stamp_inserted)
);