 update MFR_TOPIC_T set AUTO_MARK_THREADS_READ=0 where AUTO_MARK_THREADS_READ is NULL;
 alter table MFR_TOPIC_T modify (AUTO_MARK_THREADS_READ NUMBER(1,0) not null);
 
-
-
---////////////////////////////////////////////////////
---// SAK-10559
---// View who has read a message
---////////////////////////////////////////////////////
-
---if MFR_MESSAGE_T is missing NUM_READERS, run alter and update commands
---alter table MFR_MESSAGE_T add NUM_READERS int;
---update MFR_MESSAGE_T set NUM_READERS = 0;
-
-
---////////////////////////////////////////////////////
---// SAK-15655
---// Rework MyWorkspace Synoptic view of Messages & Forums
---////////////////////////////////////////////////////
-
+-- SAK-10559 view who has read a message
+-- if MFR_MESSAGE_T is missing NUM_READERS, run alter and update commands
+-- alter table MFR_MESSAGE_T add NUM_READERS int;
+-- update MFR_MESSAGE_T set NUM_READERS = 0;
+
+-- SAK-15655 rework MyWorkspace Synoptic view of Messages & Forums
 create table MFR_SYNOPTIC_ITEM
 (SYNOPTIC_ITEM_ID number(19,0) not null,
 VERSION number(10,0) not null,

insert into OSP_WORKFLOW_PARENT select s.id, null, null, null, null, null, null from osp_scaffolding s where s.id not in (select wp.id from osp_workflow_parent wp);

-- Move the use permission from site to each newly created scaffolding realms and delete the old osp.matrix.scaffolding.use permissions --

INSERT INTO SAKAI_REALM_FUNCTION VALUES (SAKAI_REALM_FUNCTION_SEQ.NEXTVAL, 'osp.matrix.scaffolding.revise.any');
INSERT INTO SAKAI_REALM_FUNCTION VALUES (SAKAI_REALM_FUNCTION_SEQ.NEXTVAL, 'osp.matrix.scaffolding.revise.own');
INSERT INTO SAKAI_REALM_FUNCTION VALUES (SAKAI_REALM_FUNCTION_SEQ.NEXTVAL, 'osp.matrix.scaffolding.delete.any');

-- see http://www.opensymphony.com/quartz/wikidocs/Quartz%201.6.0.html
update QRTZ_TRIGGERS set PRIORITY = 5 where PRIORITY IS NULL;
update QRTZ_FIRED_TRIGGERS set PRIORITY = 5 where PRIORITY IS NULL; 

-- START SiteStats 2.1 (SAK-17773)
-- IMPORTANT: Installations with previous (contrib) versions of SiteStats deployed should
