/*
Company: OptimaJet
Project: WorkflowServer Provider for Oracle
Version: 3.0
File: update_wfs_3_0.sql
*/

CREATE TABLE WORKFLOWSERVERPROCESSLOGS
(
    ID         RAW(16),
    PROCESSID  RAW(16) NOT NULL,
    CREATEDON  TIMESTAMP default current_timestamp NOT NULL,
    TIMESTAMP  TIMESTAMP default current_timestamp NOT NULL,
    SCHEMECODE NVARCHAR2(256) NULL,
    MESSAGE    NCLOB     DEFAULT ' '               NOT NULL,
    PROPERTIES NCLOB     DEFAULT ' '               NOT NULL,
    EXCEPTION  NCLOB     DEFAULT ' '               NOT NULL,
    TENANTID   NVARCHAR2(1024) NULL,
    CONSTRAINT PK_WORKFLOWSERVERPROCESSLOGS PRIMARY KEY (ID) USING INDEX STORAGE ( INITIAL 64 K NEXT 1 M MAXEXTENTS UNLIMITED )
)
    LOGGING;

CREATE INDEX IDX_WORKFLOWSERVERPROCESSLOGS_TIMESTAMP ON WORKFLOWSERVERPROCESSLOGS (TIMESTAMP);
CREATE INDEX IDX_WORKFLOWSERVERPROCESSLOGS_CREATEDON ON WORKFLOWSERVERPROCESSLOGS (CREATEDON);
CREATE INDEX IDX_WORKFLOWSERVERPROCESSLOGS_PROCESSID ON WORKFLOWSERVERPROCESSLOGS (PROCESSID);

COMMIT;