-----------------------------------------------------------------------------
-- SAKAI_SESSION
-----------------------------------------------------------------------------

CREATE TABLE SAKAI_SESSION
(
	SESSION_ID VARCHAR2 (36),
	SESSION_SERVER VARCHAR2 (255),
	SESSION_USER VARCHAR2 (99),
	SESSION_IP VARCHAR2 (128),
	SESSION_HOSTNAME VARCHAR2 (255),
	SESSION_USER_AGENT VARCHAR2 (255 CHAR),
	SESSION_START TIMESTAMP WITH TIME ZONE NULL,
	SESSION_END TIMESTAMP WITH TIME ZONE NULL,
	SESSION_ACTIVE number(1,0)
);

CREATE UNIQUE INDEX SAKAI_SESSION_INDEX ON SAKAI_SESSION
(
	SESSION_ID
);

CREATE INDEX SAKAI_SESSION_SERVER_INDEX ON SAKAI_SESSION
(
	SESSION_SERVER
);

CREATE INDEX SAKAI_SESSION_START_END_IE ON SAKAI_SESSION
(
	SESSION_START,
	SESSION_END,
	SESSION_ID
);

create index SESSION_ACTIVE_IE on SAKAI_SESSION 
(
	SESSION_ACTIVE
);
