/*
Company: OptimaJet
Project: WorkflowServer Provider for Oracle
Version: 2.8
File: update_wfs_2_8.sql
*/

ALTER TABLE WORKFLOWPROCESSINSTANCE ADD
(
	CREATIONDATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
    LASTTRANSITIONDATE TIMESTAMP NULL  
);

ALTER TABLE WORKFLOWPROCESSTRANSITIONH ADD
(
	STARTTRANSITIONTIME TIMESTAMP,
    TRANSITIONDURATION Number(10,0)
);

ALTER TABLE WORKFLOWINBOX ADD
(
	ADDINGDATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
    AVAILABLECOMMANDS NVARCHAR2(1024) DEFAULT '' NULL 
);

ALTER TABLE WORKFLOWPROCESSTRANSITIONH MODIFY FROMACTIVITYNAME NULL;

CREATE INDEX IDX_WORKFLOWAPPROVALHISTORY_IDENTITYID ON WORKFLOWAPPROVALHISTORY (IDENTITYID)
LOGGING;

COMMIT;
