CREATE TABLE flows (
    date date,
    sip inet,
    dip inet,
    "type" integer,
    sport_low integer[],
    dport_low integer[],
    sport_high integer[],
    dport_high integer[],
    sdpkgs integer,
    dspkgs integer,
    sdbytes integer,
    dsbytes integer,
    "first" timestamp without time zone,
    "last" timestamp without time zone
);
CREATE TABLE protos (
    pnum integer,
    pname text
);
CREATE TABLE networks (
    nnet cidr,
    nname text
);
CREATE TABLE volumen (
    "year" integer,
    week integer,
    snet inet,
    dnet inet
);
CREATE UNIQUE INDEX flows_0 ON flows USING btree (date, sip, dip, "type");
CREATE UNIQUE INDEX networks_0 ON networks USING btree (nnet);
CREATE INDEX flows_1 ON flows USING btree ("type");
CREATE UNIQUE INDEX protos_0 ON protos USING btree (pnum);
CREATE INDEX flows_2 ON flows USING btree (date);


