Skip to content

Commit

Permalink
SAK-31195 - Patch for master to move dashboard to 12 (sakaiproject#2639)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonespm authored and ottenhoff committed May 27, 2016
1 parent c3a43a3 commit ab22b19
Show file tree
Hide file tree
Showing 4 changed files with 223 additions and 223 deletions.
104 changes: 0 additions & 104 deletions reference/docs/conversion/sakai_11_mysql_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,6 @@ ALTER TABLE SAKAI_CLUSTER ADD COLUMN SERVER_ID VARCHAR (64);
ALTER TABLE GB_GRADEBOOK_T ADD COLUMN COURSE_POINTS_DISPLAYED bit(1) NOT NULL DEFAULT b'0';
-- End SAK-27937

--
-- SAK-27929 Add Dashboard to default !user site
--

INSERT INTO SAKAI_SITE_PAGE VALUES('!user-99', '!user', 'Dashboard', '0', 0, '0' );
INSERT INTO SAKAI_SITE_TOOL VALUES('!user-999', '!user-99', '!user', 'sakai.dashboard', 1, 'Dashboard', NULL );

-- SAK-25385
ALTER TABLE GB_GRADABLE_OBJECT_T MODIFY DUE_DATE DATETIME;
-- End SAK-25385
Expand Down Expand Up @@ -733,103 +726,6 @@ create table lesson_builder_ch_status (
);
create index lesson_builder_p_eval_res_row on lesson_builder_p_eval_results(page_id);

-- ------------------------------
-- DASHBOARD -----
-- ------------------------------

create table dash_availability_check
( id bigint not null auto_increment, entity_ref varchar(255) not null,
entity_type_id varchar(255) not null, scheduled_time datetime not null, primary key (id));
create unique index dash_availability_check_idx on dash_availability_check(entity_ref, scheduled_time);
create index dash_availability_check_time_idx on dash_availability_check(scheduled_time);

create table if not exists dash_calendar_item ( id bigint not null auto_increment,
calendar_time datetime not null, calendar_time_label_key varchar(40), title varchar(255) not null,
entity_ref varchar(255) not null, entity_type bigint not null, subtype varchar(255), context_id bigint not null,
repeating_event_id bigint, sequence_num integer, primary key (id) );
create index dash_calendar_time_idx on dash_calendar_item (calendar_time);
create unique index dash_calendar_entity_label_idx on dash_calendar_item (entity_ref, calendar_time_label_key, sequence_num);
create index dash_calendar_entity_idx on dash_calendar_item (entity_ref);

create table if not exists dash_calendar_link ( id bigint not null auto_increment,
person_id bigint not null, context_id bigint not null, item_id bigint not null, hidden bit default 0,
sticky bit default 0, unique (person_id, context_id, item_id), primary key (id) );
create index dash_calendar_link_idx on dash_calendar_link (person_id, context_id, item_id, hidden, sticky);
create index dash_calendar_link_item_id_idx on dash_calendar_link (item_id);

create table if not exists dash_config ( id bigint not null auto_increment,
property_name varchar(99) not null, property_value integer not null, primary key (id) );
create unique index dash_config_name_idx on dash_config(property_name);
insert into dash_config (property_name, property_value) values ('PROP_DEFAULT_ITEMS_IN_PANEL', 5);
insert into dash_config (property_name, property_value) values ('PROP_DEFAULT_ITEMS_IN_DISCLOSURE', 20);
insert into dash_config (property_name, property_value) values ('PROP_DEFAULT_ITEMS_IN_GROUP', 2);
insert into dash_config (property_name, property_value) values ('PROP_REMOVE_NEWS_ITEMS_AFTER_WEEKS', 8);
insert into dash_config (property_name, property_value) values ('PROP_REMOVE_STARRED_NEWS_ITEMS_AFTER_WEEKS', 26);
insert into dash_config (property_name, property_value) values ('PROP_REMOVE_HIDDEN_NEWS_ITEMS_AFTER_WEEKS', 4);
insert into dash_config (property_name, property_value) values ('PROP_REMOVE_CALENDAR_ITEMS_AFTER_WEEKS', 2);
insert into dash_config (property_name, property_value) values ('PROP_REMOVE_STARRED_CALENDAR_ITEMS_AFTER_WEEKS', 26);
insert into dash_config (property_name, property_value) values ('PROP_REMOVE_HIDDEN_CALENDAR_ITEMS_AFTER_WEEKS', 1);
insert into dash_config (property_name, property_value) values ('PROP_REMOVE_NEWS_ITEMS_WITH_NO_LINKS', 1);
insert into dash_config (property_name, property_value) values ('PROP_REMOVE_CALENDAR_ITEMS_WITH_NO_LINKS', 1);
insert into dash_config (property_name, property_value) values ('PROP_DAYS_BETWEEN_HORIZ0N_UPDATES', 1);
insert into dash_config (property_name, property_value) values ('PROP_WEEKS_TO_HORIZON', 4);
insert into dash_config (property_name, property_value) values ('PROP_MOTD_MODE', 1);
insert into dash_config (property_name, property_value) values ('PROP_LOG_MODE_FOR_NAVIGATION_EVENTS', 2);
insert into dash_config (property_name, property_value) values ('PROP_LOG_MODE_FOR_ITEM_DETAIL_EVENTS', 2);
insert into dash_config (property_name, property_value) values ('PROP_LOG_MODE_FOR_PREFERENCE_EVENTS', 2);
insert into dash_config (property_name, property_value) values ('PROP_LOG_MODE_FOR_DASH_NAV_EVENTS', 2);
insert into dash_config (property_name, property_value) values ('PROP_LOOP_TIMER_ENABLED', 0);


create table if not exists dash_context ( id bigint not null auto_increment, context_id varchar(255) not null,
context_url varchar(1024) not null, context_title varchar(255) not null, primary key (id) );
create unique index dash_context_idx on dash_context (context_id);

create table dash_event (event_id bigint auto_increment, event_date timestamp, event varchar (32),
ref varchar (255), context varchar (255), session_id varchar (163), event_code varchar (1), primary key (event_id));

create table if not exists dash_news_item ( id bigint not null auto_increment, news_time datetime not null,
news_time_label_key varchar(40), title varchar(255) not null,
entity_ref varchar(255) not null, entity_type bigint not null, subtype varchar(255),
context_id bigint not null, grouping_id varchar(90), primary key (id) );
create index dash_news_time_idx on dash_news_item (news_time);
create index dash_news_grouping_idx on dash_news_item (grouping_id);
create unique index dash_news_entity_idx on dash_news_item (entity_ref);

create table if not exists dash_news_link ( id bigint not null auto_increment, person_id bigint not null,
context_id bigint not null, item_id bigint not null, hidden bit default 0, sticky bit default 0,
unique (person_id, context_id, item_id), primary key (id) );
create index dash_news_link_idx on dash_news_link (person_id, context_id, item_id, hidden, sticky);
create index dash_news_link_item_id_idx on dash_news_link (item_id);

create table if not exists dash_person ( id bigint not null auto_increment,user_id varchar(99) not null,
sakai_id varchar(99), primary key (id) );
create unique index dash_person_user_id_idx on dash_person (user_id);
create unique index dash_person_sakai_id_idx on dash_person (sakai_id);

create table if not exists dash_repeating_event (id bigint not null auto_increment,
first_time datetime not null, last_time datetime, frequency varchar(40) not null, max_count integer,
calendar_time_label_key varchar(40), title varchar(255) not null,
entity_ref varchar(265) not null, subtype varchar(255), entity_type bigint not null, context_id bigint not null,
primary key (id) );
create index dash_repeating_event_first_idx on dash_repeating_event (first_time);
create index dash_repeating_event_last_idx on dash_repeating_event (last_time);

create table if not exists dash_sourcetype
( id bigint not null auto_increment, identifier varchar(255) not null, primary key (id) );
create unique index dash_source_idx on dash_sourcetype (identifier);

create table if not exists dash_task_lock
( id bigint not null auto_increment,
task varchar(255) not null,
server_id varchar(255) not null,
claim_time timestamp,
last_update timestamp,
has_lock bit default 0,
primary key (id));
create index dash_lock_ct_idx on dash_task_lock (claim_time);
create unique index dash_lock_ts_idx on dash_task_lock (task, server_id);

-- ---------------------------------------------------------------------------
-- SAKAI_CONFIG_ITEM - KNL-1063 - MYSQL
-- ---------------------------------------------------------------------------
Expand Down
118 changes: 0 additions & 118 deletions reference/docs/conversion/sakai_11_oracle_conversion.sql
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,6 @@ alter table GB_GRADEBOOK_T add COURSE_POINTS_DISPLAYED number(1,0) default '0' n

-- END SAK-27937


--
-- SAK-27929 Add Dashboard to default !user site
--

INSERT INTO SAKAI_SITE_PAGE VALUES('!user-99', '!user', 'Dashboard', '0', 0, '0' );
INSERT INTO SAKAI_SITE_TOOL VALUES('!user-999', '!user-99', '!user', 'sakai.dashboard', 1, 'Dashboard', NULL );

-- SAK-25385
ALTER TABLE GB_GRADABLE_OBJECT_T MODIFY DUE_DATE TIMESTAMP;
-- End SAK-25385
Expand Down Expand Up @@ -785,116 +777,6 @@ create table lesson_builder_ch_status (
);
create index lb_p_eval_res_row on lesson_builder_p_eval_results(page_id);

-- ------------------------------
-- DASHBOARD -----
-- ------------------------------

create table dash_availability_check
( id number not null primary key, entity_ref varchar2(255) not null,
entity_type_id varchar2(255) not null, scheduled_time timestamp(0) not null);
create sequence dash_availability_check_seq start with 1 increment by 1 nomaxvalue;
create unique index dash_avail_check_idx on dash_availability_check(entity_ref, scheduled_time);
create index dash_avail_check_time_idx on dash_availability_check(scheduled_time);

create table dash_calendar_item
( id number not null primary key, calendar_time timestamp(0) not null, calendar_time_label_key varchar2(40),
title varchar2(255) not null,
entity_ref varchar2(255) not null, entity_type number not null, subtype varchar2(255), context_id number not null,
repeating_event_id number, sequence_num integer );
create sequence dash_calendar_item_seq start with 1 increment by 1 nomaxvalue;
create index dash_cal_time_idx on dash_calendar_item (calendar_time);
create unique index dash_cal_entity_label_idx on dash_calendar_item (entity_ref, calendar_time_label_key, sequence_num);
create index dash_cal_entity_idx on dash_calendar_item (entity_ref);

create table dash_calendar_link
( id number not null primary key, person_id number not null, context_id number not null,
item_id number not null, hidden number(1,0) default 0, sticky number(1,0) default 0,
unique (person_id, context_id, item_id) );
create sequence dash_calendar_link_seq start with 1 increment by 1 nomaxvalue;
create index dash_calendar_link_idx on dash_calendar_link (person_id, context_id, item_id, hidden, sticky);
create index dash_calendar_link_item_id_idx on dash_calendar_link (item_id);

create table dash_config ( id number not null primary key,
property_name varchar2(99) not null, property_value number(10,0) not null );
create sequence dash_config_seq start with 1 increment by 1 nomaxvalue;
create unique index dash_config_name_idx on dash_config(property_name);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_DEFAULT_ITEMS_IN_PANEL', 5);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_DEFAULT_ITEMS_IN_DISCLOSURE', 20);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_DEFAULT_ITEMS_IN_GROUP', 2);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_REMOVE_NEWS_ITEMS_AFTER_WEEKS', 8);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_REMOVE_STARRED_NEWS_ITEMS_AFTER_WEEKS', 26);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_REMOVE_HIDDEN_NEWS_ITEMS_AFTER_WEEKS', 4);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_REMOVE_CALENDAR_ITEMS_AFTER_WEEKS', 2);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_REMOVE_STARRED_CALENDAR_ITEMS_AFTER_WEEKS', 26);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_REMOVE_HIDDEN_CALENDAR_ITEMS_AFTER_WEEKS', 1);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_REMOVE_NEWS_ITEMS_WITH_NO_LINKS', 1);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_REMOVE_CALENDAR_ITEMS_WITH_NO_LINKS', 1);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_DAYS_BETWEEN_HORIZ0N_UPDATES', 1);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_WEEKS_TO_HORIZON', 4);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_MOTD_MODE', 1);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_LOG_MODE_FOR_NAVIGATION_EVENTS', 2);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_LOG_MODE_FOR_ITEM_DETAIL_EVENTS', 2);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_LOG_MODE_FOR_PREFERENCE_EVENTS', 2);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_LOG_MODE_FOR_DASH_NAV_EVENTS', 2);
insert into dash_config (id, property_name, property_value) values (dash_config_seq.nextval, 'PROP_LOOP_TIMER_ENABLED', 0);

create table dash_context
( id number not null primary key, context_id varchar2(255) not null,
context_url varchar2(1024) not null, context_title varchar2(255) not null );
create sequence dash_context_seq start with 1 increment by 1 nomaxvalue;
create unique index dash_context_idx on dash_context (context_id);

create table dash_event (event_id number not null primary key, event_date timestamp with time zone,
event varchar2 (32), ref varchar2 (255), context varchar2 (255), session_id varchar2 (163), event_code varchar2 (1));
--create unique index dash_event_index on dash_event (event_id asc);
create sequence dash_event_seq start with 1 increment by 1 nomaxvalue;

create table dash_news_item ( id number not null primary key,
news_time timestamp(0) not null, news_time_label_key varchar2(40), title varchar2(255) not null,
entity_ref varchar2(255) not null,
entity_type number not null, subtype varchar2(255), context_id number not null, grouping_id varchar2(90) );
create sequence dash_news_item_seq start with 1 increment by 1 nomaxvalue;
create index dash_news_time_idx on dash_news_item (news_time);
create index dash_news_grouping_idx on dash_news_item (grouping_id);
create unique index dash_news_entity_idx on dash_news_item (entity_ref);

create table dash_news_link
( id number not null primary key, person_id number not null, context_id number not null,
item_id number not null, hidden number(1,0) default 0, sticky number(1,0) default 0, unique (person_id, context_id, item_id) );
create sequence dash_news_link_seq start with 1 increment by 1 nomaxvalue;
create index dash_news_link_idx on dash_news_link (person_id, context_id, item_id, hidden, sticky);
create index dash_news_link_item_id_idx on dash_news_link (item_id);

create table dash_person
( id number not null primary key,user_id varchar2(99) not null, sakai_id varchar2(99) );
create sequence dash_person_seq start with 1 increment by 1 nomaxvalue;
create unique index dash_person_user_id_idx on dash_person (user_id);
create unique index dash_person_sakai_id_idx on dash_person (sakai_id);

create table dash_repeating_event (id number not null primary key,
first_time timestamp(0) not null, last_time timestamp(0), frequency varchar2(40) not null, max_count integer,
calendar_time_label_key varchar2(40), title varchar2(255) not null,
entity_ref varchar2(255) not null, subtype varchar2(255), entity_type number not null, context_id number not null );
create sequence dash_repeating_event_seq start with 1 increment by 1 nomaxvalue;
create index dash_repeating_event_first_idx on dash_repeating_event (first_time);
create index dash_repeating_event_last_idx on dash_repeating_event (last_time);

create table dash_sourcetype
( id number not null primary key, identifier varchar2(255) not null );
create sequence dash_sourcetype_seq start with 1 increment by 1 nomaxvalue;
create unique index dash_source_idx on dash_sourcetype (identifier);

create table dash_task_lock
( id number not null primary key,
task varchar2(255) not null,
server_id varchar2(255) not null,
claim_time timestamp(9),
last_update timestamp(9),
has_lock number(1,0) default 0);
create sequence dash_task_lock_seq start with 1 increment by 1 nomaxvalue;
create index dash_lock_ct_idx on dash_task_lock (claim_time);
create unique index dash_lock_ts_idx on dash_task_lock (task, server_id);

-----------------------------------------------------------------------------
-- SAKAI_CONFIG_ITEM - KNL-1063 - ORACLE
-----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit ab22b19

Please sign in to comment.