Skip to content

Commit

Permalink
STAT-270 adjust date column name to p_date and adjust all references …
Browse files Browse the repository at this point in the history
…in ddl and updates

git-svn-id: https://source.sakaiproject.org/svn/sitestats/trunk@88478 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
steveswinsburg committed Feb 17, 2011
1 parent 95953d0 commit da48bd2
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions sitestats/schema/db-tables/db2/sitestats.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create table SST_EVENTS (ID bigint generated by default as identity, USER_ID varchar(99) not null, SITE_ID varchar(99) not null, EVENT_ID varchar(32) not null, EVENT_DATE date not null, EVENT_COUNT bigint not null, primary key (ID));
create table SST_JOB_RUN (ID bigint generated by default as identity, JOB_START_DATE timestamp, JOB_END_DATE timestamp, START_EVENT_ID bigint, END_EVENT_ID bigint, LAST_EVENT_DATE timestamp, primary key (ID));
create table SST_PREFERENCES (ID bigint generated by default as identity, SITE_ID varchar(99) not null, PREFS clob(255) not null, primary key (ID));
create table SST_PRESENCES (ID bigint generated by default as identity, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME timestamp default null, primary key (ID));
create table SST_PRESENCES (ID bigint generated by default as identity, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, P_DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME timestamp default null, primary key (ID));
create table SST_REPORTS (ID bigint generated by default as identity, SITE_ID varchar(99), TITLE varchar(255) not null, DESCRIPTION clob(2147483647), HIDDEN smallint, REPORT_DEF clob(255) not null, CREATED_BY varchar(99) not null, CREATED_ON timestamp not null, MODIFIED_BY varchar(99), MODIFIED_ON timestamp, primary key (ID));
create table SST_RESOURCES (ID bigint generated by default as identity, USER_ID varchar(99) not null, SITE_ID varchar(99) not null, RESOURCE_REF varchar(255) not null, RESOURCE_ACTION varchar(12) not null, RESOURCE_DATE date not null, RESOURCE_COUNT bigint not null, primary key (ID));
create table SST_SITEACTIVITY (ID bigint generated by default as identity, SITE_ID varchar(99) not null, ACTIVITY_DATE date not null, EVENT_ID varchar(32) not null, ACTIVITY_COUNT bigint not null, primary key (ID));
Expand All @@ -12,10 +12,10 @@ create index SST_EVENTS_SITEEVENTUSER_ID_IX on SST_EVENTS (USER_ID, SITE_ID, EVE
create index SST_EVENTS_EVENT_ID_IX on SST_EVENTS (EVENT_ID);
create index SST_EVENTS_DATE_IX on SST_EVENTS (EVENT_DATE);
create index SST_PREFERENCES_SITE_ID_IX on SST_PREFERENCES (SITE_ID);
create index SST_PRESENCE_DATE_IX on SST_PRESENCES (DATE);
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_SITE_ID_IX on SST_PRESENCES (SITE_ID);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, DATE);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, P_DATE);
create index SST_REPORTS_SITE_ID_IX on SST_REPORTS (SITE_ID);
create index SST_RESOURCES_USER_ID_IX on SST_RESOURCES (USER_ID);
create index SST_RESOURCES_SITE_ID_IX on SST_RESOURCES (SITE_ID);
Expand Down
6 changes: 3 additions & 3 deletions sitestats/schema/db-tables/derby/sitestats.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create table SST_EVENTS (ID bigint not null, USER_ID varchar(99) not null, SITE_ID varchar(99) not null, EVENT_ID varchar(32) not null, EVENT_DATE date not null, EVENT_COUNT bigint not null, primary key (ID));
create table SST_JOB_RUN (ID bigint not null, JOB_START_DATE timestamp, JOB_END_DATE timestamp, START_EVENT_ID bigint, END_EVENT_ID bigint, LAST_EVENT_DATE timestamp, primary key (ID));
create table SST_PREFERENCES (ID bigint not null, SITE_ID varchar(99) not null, PREFS clob(255) not null, primary key (ID));
create table SST_PRESENCES (ID bigint not null, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME timestamp default null, primary key (ID));
create table SST_PRESENCES (ID bigint not null, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, P_DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME timestamp default null, primary key (ID));
create table SST_REPORTS (ID bigint not null, SITE_ID varchar(99), TITLE varchar(255) not null, DESCRIPTION clob(2147483647), HIDDEN smallint, REPORT_DEF clob(255) not null, CREATED_BY varchar(99) not null, CREATED_ON timestamp not null, MODIFIED_BY varchar(99), MODIFIED_ON timestamp, primary key (ID));
create table SST_RESOURCES (ID bigint not null, USER_ID varchar(99) not null, SITE_ID varchar(99) not null, RESOURCE_REF varchar(255) not null, RESOURCE_ACTION varchar(12) not null, RESOURCE_DATE date not null, RESOURCE_COUNT bigint not null, primary key (ID));
create table SST_SITEACTIVITY (ID bigint not null, SITE_ID varchar(99) not null, ACTIVITY_DATE date not null, EVENT_ID varchar(32) not null, ACTIVITY_COUNT bigint not null, primary key (ID));
Expand All @@ -12,10 +12,10 @@ create index SST_EVENTS_SITEEVENTUSER_ID_IX on SST_EVENTS (USER_ID, SITE_ID, EVE
create index SST_EVENTS_EVENT_ID_IX on SST_EVENTS (EVENT_ID);
create index SST_EVENTS_DATE_IX on SST_EVENTS (EVENT_DATE);
create index SST_PREFERENCES_SITE_ID_IX on SST_PREFERENCES (SITE_ID);
create index SST_PRESENCE_DATE_IX on SST_PRESENCES (DATE);
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_SITE_ID_IX on SST_PRESENCES (SITE_ID);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, DATE);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, P_DATE);
create index SST_REPORTS_SITE_ID_IX on SST_REPORTS (SITE_ID);
create index SST_RESOURCES_USER_ID_IX on SST_RESOURCES (USER_ID);
create index SST_RESOURCES_SITE_ID_IX on SST_RESOURCES (SITE_ID);
Expand Down
6 changes: 3 additions & 3 deletions sitestats/schema/db-tables/hsqldb/sitestats.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create table SST_EVENTS (ID bigint generated by default as identity (start with 1), USER_ID varchar(99) not null, SITE_ID varchar(99) not null, EVENT_ID varchar(32) not null, EVENT_DATE date not null, EVENT_COUNT bigint not null, primary key (ID));
create table SST_JOB_RUN (ID bigint generated by default as identity (start with 1), JOB_START_DATE timestamp, JOB_END_DATE timestamp, START_EVENT_ID bigint, END_EVENT_ID bigint, LAST_EVENT_DATE timestamp, primary key (ID));
create table SST_PREFERENCES (ID bigint generated by default as identity (start with 1), SITE_ID varchar(99) not null, PREFS longvarchar not null, primary key (ID));
create table SST_PRESENCES (ID bigint generated by default as identity (start with 1), SITE_ID varchar(99) not null, USER_ID varchar(99) not null, DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME timestamp default null, primary key (ID));
create table SST_PRESENCES (ID bigint generated by default as identity (start with 1), SITE_ID varchar(99) not null, USER_ID varchar(99) not null, P_DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME timestamp default null, primary key (ID));
create table SST_REPORTS (ID bigint generated by default as identity (start with 1), SITE_ID varchar(99), TITLE varchar(255) not null, DESCRIPTION longvarchar, HIDDEN bit, REPORT_DEF longvarchar not null, CREATED_BY varchar(99) not null, CREATED_ON timestamp not null, MODIFIED_BY varchar(99), MODIFIED_ON timestamp, primary key (ID));
create table SST_RESOURCES (ID bigint generated by default as identity (start with 1), USER_ID varchar(99) not null, SITE_ID varchar(99) not null, RESOURCE_REF varchar(255) not null, RESOURCE_ACTION varchar(12) not null, RESOURCE_DATE date not null, RESOURCE_COUNT bigint not null, primary key (ID));
create table SST_SITEACTIVITY (ID bigint generated by default as identity (start with 1), SITE_ID varchar(99) not null, ACTIVITY_DATE date not null, EVENT_ID varchar(32) not null, ACTIVITY_COUNT bigint not null, primary key (ID));
Expand All @@ -12,10 +12,10 @@ create index SST_EVENTS_SITEEVENTUSER_ID_IX on SST_EVENTS (USER_ID, SITE_ID, EVE
create index SST_EVENTS_EVENT_ID_IX on SST_EVENTS (EVENT_ID);
create index SST_EVENTS_DATE_IX on SST_EVENTS (EVENT_DATE);
create index SST_PREFERENCES_SITE_ID_IX on SST_PREFERENCES (SITE_ID);
create index SST_PRESENCE_DATE_IX on SST_PRESENCES (DATE);
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_SITE_ID_IX on SST_PRESENCES (SITE_ID);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, DATE);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, P_DATE);
create index SST_REPORTS_SITE_ID_IX on SST_REPORTS (SITE_ID);
create index SST_RESOURCES_USER_ID_IX on SST_RESOURCES (USER_ID);
create index SST_RESOURCES_SITE_ID_IX on SST_RESOURCES (SITE_ID);
Expand Down
6 changes: 3 additions & 3 deletions sitestats/schema/db-tables/mssql/sitestats.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create table SST_EVENTS (ID numeric(19,0) identity not null, USER_ID varchar(99) not null, SITE_ID varchar(99) not null, EVENT_ID varchar(32) not null, EVENT_DATE datetime not null, EVENT_COUNT numeric(19,0) not null, primary key (ID));
create table SST_JOB_RUN (ID numeric(19,0) identity not null, JOB_START_DATE datetime null, JOB_END_DATE datetime null, START_EVENT_ID numeric(19,0) null, END_EVENT_ID numeric(19,0) null, LAST_EVENT_DATE datetime null, primary key (ID));
create table SST_PREFERENCES (ID numeric(19,0) identity not null, SITE_ID varchar(99) not null, PREFS text not null, primary key (ID));
create table SST_PRESENCES (ID numeric(19,0) identity not null, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, DATE datetime not null, DURATION numeric(19,0) default 0 not null, LAST_VISIT_START_TIME datetime default null null, primary key (ID));
create table SST_PRESENCES (ID numeric(19,0) identity not null, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, P_DATE datetime not null, DURATION numeric(19,0) default 0 not null, LAST_VISIT_START_TIME datetime default null null, primary key (ID));
create table SST_REPORTS (ID numeric(19,0) identity not null, SITE_ID varchar(99) null, TITLE varchar(255) not null, DESCRIPTION text null, HIDDEN tinyint null, REPORT_DEF text not null, CREATED_BY varchar(99) not null, CREATED_ON datetime not null, MODIFIED_BY varchar(99) null, MODIFIED_ON datetime null, primary key (ID));
create table SST_RESOURCES (ID numeric(19,0) identity not null, USER_ID varchar(99) not null, SITE_ID varchar(99) not null, RESOURCE_REF varchar(255) not null, RESOURCE_ACTION varchar(12) not null, RESOURCE_DATE datetime not null, RESOURCE_COUNT numeric(19,0) not null, primary key (ID));
create table SST_SITEACTIVITY (ID numeric(19,0) identity not null, SITE_ID varchar(99) not null, ACTIVITY_DATE datetime not null, EVENT_ID varchar(32) not null, ACTIVITY_COUNT numeric(19,0) not null, primary key (ID));
Expand All @@ -12,10 +12,10 @@ create index SST_EVENTS_SITEEVENTUSER_ID_IX on SST_EVENTS (USER_ID, SITE_ID, EVE
create index SST_EVENTS_EVENT_ID_IX on SST_EVENTS (EVENT_ID);
create index SST_EVENTS_DATE_IX on SST_EVENTS (EVENT_DATE);
create index SST_PREFERENCES_SITE_ID_IX on SST_PREFERENCES (SITE_ID);
create index SST_PRESENCE_DATE_IX on SST_PRESENCES (DATE);
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_SITE_ID_IX on SST_PRESENCES (SITE_ID);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, DATE);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, P_DATE);
create index SST_REPORTS_SITE_ID_IX on SST_REPORTS (SITE_ID);
create index SST_RESOURCES_USER_ID_IX on SST_RESOURCES (USER_ID);
create index SST_RESOURCES_SITE_ID_IX on SST_RESOURCES (SITE_ID);
Expand Down
6 changes: 3 additions & 3 deletions sitestats/schema/db-tables/mysql/sitestats.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create table SST_EVENTS (ID bigint not null auto_increment, USER_ID varchar(99) not null, SITE_ID varchar(99) not null, EVENT_ID varchar(32) not null, EVENT_DATE date not null, EVENT_COUNT bigint not null, primary key (ID));
create table SST_JOB_RUN (ID bigint not null auto_increment, JOB_START_DATE datetime, JOB_END_DATE datetime, START_EVENT_ID bigint, END_EVENT_ID bigint, LAST_EVENT_DATE datetime, primary key (ID));
create table SST_PREFERENCES (ID bigint not null auto_increment, SITE_ID varchar(99) not null, PREFS text not null, primary key (ID));
create table SST_PRESENCES (ID bigint not null auto_increment, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME datetime default null, primary key (ID));
create table SST_PRESENCES (ID bigint not null auto_increment, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, P_DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME datetime default null, primary key (ID));
create table SST_REPORTS (ID bigint not null auto_increment, SITE_ID varchar(99), TITLE varchar(255) not null, DESCRIPTION longtext, HIDDEN bit, REPORT_DEF text not null, CREATED_BY varchar(99) not null, CREATED_ON datetime not null, MODIFIED_BY varchar(99), MODIFIED_ON datetime, primary key (ID));
create table SST_RESOURCES (ID bigint not null auto_increment, USER_ID varchar(99) not null, SITE_ID varchar(99) not null, RESOURCE_REF varchar(255) not null, RESOURCE_ACTION varchar(12) not null, RESOURCE_DATE date not null, RESOURCE_COUNT bigint not null, primary key (ID));
create table SST_SITEACTIVITY (ID bigint not null auto_increment, SITE_ID varchar(99) not null, ACTIVITY_DATE date not null, EVENT_ID varchar(32) not null, ACTIVITY_COUNT bigint not null, primary key (ID));
Expand All @@ -12,10 +12,10 @@ create index SST_EVENTS_SITEEVENTUSER_ID_IX on SST_EVENTS (USER_ID, SITE_ID, EVE
create index SST_EVENTS_EVENT_ID_IX on SST_EVENTS (EVENT_ID);
create index SST_EVENTS_DATE_IX on SST_EVENTS (EVENT_DATE);
create index SST_PREFERENCES_SITE_ID_IX on SST_PREFERENCES (SITE_ID);
create index SST_PRESENCE_DATE_IX on SST_PRESENCES (DATE);
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_SITE_ID_IX on SST_PRESENCES (SITE_ID);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, DATE);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, P_DATE);
create index SST_REPORTS_SITE_ID_IX on SST_REPORTS (SITE_ID);
create index SST_RESOURCES_USER_ID_IX on SST_RESOURCES (USER_ID);
create index SST_RESOURCES_SITE_ID_IX on SST_RESOURCES (SITE_ID);
Expand Down
6 changes: 3 additions & 3 deletions sitestats/schema/db-tables/oracle/sitestats.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
create table SST_EVENTS (ID number(19,0) not null, USER_ID varchar2(99 char) not null, SITE_ID varchar2(99 char) not null, EVENT_ID varchar2(32 char) not null, EVENT_DATE date not null, EVENT_COUNT number(19,0) not null, primary key (ID));
create table SST_JOB_RUN (ID number(19,0) not null, JOB_START_DATE timestamp, JOB_END_DATE timestamp, START_EVENT_ID number(19,0), END_EVENT_ID number(19,0), LAST_EVENT_DATE timestamp, primary key (ID));
create table SST_PREFERENCES (ID number(19,0) not null, SITE_ID varchar2(99 char) not null, PREFS clob not null, primary key (ID));
create table SST_PRESENCES (ID number(19,0) not null, SITE_ID varchar2(99 char) not null, USER_ID varchar2(99 char) not null, DATE date not null, DURATION number(19,0) default 0 not null, LAST_VISIT_START_TIME timestamp default null, primary key (ID));
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 table SST_REPORTS (ID number(19,0) not null, SITE_ID varchar2(99 char), TITLE varchar2(255 char) not null, DESCRIPTION clob, HIDDEN number(1,0), REPORT_DEF clob not null, CREATED_BY varchar2(99 char) not null, CREATED_ON timestamp not null, MODIFIED_BY varchar2(99 char), MODIFIED_ON timestamp, primary key (ID));
create table SST_RESOURCES (ID number(19,0) not null, USER_ID varchar2(99 char) not null, SITE_ID varchar2(99 char) not null, RESOURCE_REF varchar2(255 char) not null, RESOURCE_ACTION varchar2(12 char) not null, RESOURCE_DATE date not null, RESOURCE_COUNT number(19,0) not null, primary key (ID));
create table SST_SITEACTIVITY (ID number(19,0) not null, SITE_ID varchar2(99 char) not null, ACTIVITY_DATE date not null, EVENT_ID varchar2(32 char) not null, ACTIVITY_COUNT number(19,0) not null, primary key (ID));
Expand All @@ -12,10 +12,10 @@ create index SST_EVENTS_SITEEVENTUSER_ID_IX on SST_EVENTS (USER_ID, SITE_ID, EVE
create index SST_EVENTS_EVENT_ID_IX on SST_EVENTS (EVENT_ID);
create index SST_EVENTS_DATE_IX on SST_EVENTS (EVENT_DATE);
create index SST_PREFERENCES_SITE_ID_IX on SST_PREFERENCES (SITE_ID);
create index SST_PRESENCE_DATE_IX on SST_PRESENCES (DATE);
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_SITE_ID_IX on SST_PRESENCES (SITE_ID);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, DATE);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, P_DATE);
create index SST_REPORTS_SITE_ID_IX on SST_REPORTS (SITE_ID);
create index SST_RESOURCES_USER_ID_IX on SST_RESOURCES (USER_ID);
create index SST_RESOURCES_SITE_ID_IX on SST_RESOURCES (SITE_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<column name="USER_ID" length="99" not-null="true" index="SST_PRESENCE_SITEUSERDATE_ID_IX" />
</property>
<property name="date" type="date" not-null="true" index="SST_PRESENCE_DATE_IX">
<column name="`DATE`" not-null="true" index="SST_PRESENCE_SITEUSERDATE_ID_IX" />
<column name="P_DATE" not-null="true" index="SST_PRESENCE_SITEUSERDATE_ID_IX" />
</property>
<property name="duration" type="long" not-null="true">
<column name="DURATION" not-null="true" default="0" />
Expand Down
6 changes: 3 additions & 3 deletions sitestats/updating/SiteStats_2-x_2-2_db2_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@


-- STAT-241: Tracking of time spent in site
create table SST_PRESENCES (ID bigint generated by default as identity, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME timestamp default null, primary key (ID));
create index SST_PRESENCE_DATE_IX on SST_PRESENCES (DATE);
create table SST_PRESENCES (ID bigint generated by default as identity, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, P_DATE date not null, DURATION bigint 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_SITE_ID_IX on SST_PRESENCES (SITE_ID);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, DATE);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, P_DATE);
6 changes: 3 additions & 3 deletions sitestats/updating/SiteStats_2-x_2-2_mysql_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@


-- STAT-241: Tracking of time spent in site
create table SST_PRESENCES (ID bigint not null auto_increment, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME datetime default null, primary key (ID));
create index SST_PRESENCE_DATE_IX on SST_PRESENCES (DATE);
create table SST_PRESENCES (ID bigint not null auto_increment, SITE_ID varchar(99) not null, USER_ID varchar(99) not null, P_DATE date not null, DURATION bigint default 0 not null, LAST_VISIT_START_TIME datetime 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_SITE_ID_IX on SST_PRESENCES (SITE_ID);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, DATE);
create index SST_PRESENCE_SITEUSERDATE_ID_IX on SST_PRESENCES (SITE_ID, USER_ID, P_DATE);
Loading

0 comments on commit da48bd2

Please sign in to comment.