forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSiteStats_2-x_2-2_oracle_conversion.sql
17 lines (14 loc) · 1.11 KB
/
SiteStats_2-x_2-2_oracle_conversion.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- This is the Oracle SiteStats 2.x -> 2.2 conversion script
----------------------------------------------------------------------------------------------------------------------------------------
--
-- Run this before you run your first app server with the updated SiteStats.
-- auto.ddl does not need to be enabled in your app server - this script takes care of all new TABLEs, changed TABLEs, and changed data.
--
----------------------------------------------------------------------------------------------------------------------------------------
-- STAT-241: Tracking of time spent in site
create table SST_PRESENCES (ID number(19,0) not null, SITE_ID varchar2(99 char) not null, USER_ID varchar2(99 char) not null, P_DATE date not null, DURATION number(19,0) default 0 not null, LAST_VISIT_START_TIME timestamp default null, primary key (ID));
create index SST_PRESENCE_DATE_IX on SST_PRESENCES (P_DATE);
create index SST_PRESENCE_USER_ID_IX on SST_PRESENCES (USER_ID);
create index SST_PRESENCE_SUD_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, P_DATE);
-- STAT-286: missing SiteStats sequence
create sequence SST_PRESENCE_ID;