CREATE cached TABLE HISTORY (historyid integer generated by default as identity (start with 1), sessionid bigint not null, histtype integer default 1, timesentmillis bigint default 0, timeelapsedmillis int default 0, method varchar default '', uri varchar default '', reqheader varchar default '', reqbody varchar default '', resheader varchar default '', resbody varchar default '');
CREATE INDEX HISTORY_SPIDER_INDEX ON HISTORY (URI, REQBODY, SESSIONID, HISTTYPE, METHOD);
create cached table session (sessionid bigint not null primary key, sessionname varchar default '', lastaccess datetime default now not null);
create cached TABLE ALERT (alertid integer generated by default as identity, scanid integer not null, pluginid integer default 0, alert varchar default '', risk integer default 0, reliability integer default 1, description varchar default '', uri varchar default '', param varchar default '', otherinfo varchar default '', solution varchar default '', reference varchar default '', historyid integer);
create cached TABLE SCAN (scanid integer generated by default as identity, sessionid bigint not null, scanname varchar default '', scantime datetime default now not null);
