CREATE cached TABLE HISTORY (historyid integer generated by default as identity (start with 1), sessionid bigint not null, histtype integer default 1, statuscode integer default 0, 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 '', tag varchar default '');
CREATE INDEX HISTORY_INDEX ON HISTORY (URI, METHOD, REQBODY, SESSIONID, HISTTYPE, HISTORYID, STATUSCODE);
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);
create cached TABLE DUMMY (dummyid int not null);
insert into dummy (dummyid) values (1);