 INSERT INTO SAKAI_REALM_RL_FN VALUES((select REALM_KEY from SAKAI_REALM where REALM_ID = '!site.template.portfolio'), (select ROLE_KEY from SAKAI_REALM_ROLE where ROLE_NAME = 'Reviewer'), (select FUNCTION_KEY from SAKAI_REALM_FUNCTION where FUNCTION_NAME = 'roster.export'));
 INSERT INTO SAKAI_REALM_RL_FN VALUES((select REALM_KEY from SAKAI_REALM where REALM_ID = '!site.template.portfolio'), (select ROLE_KEY from SAKAI_REALM_ROLE where ROLE_NAME = 'Reviewer'), (select FUNCTION_KEY from SAKAI_REALM_FUNCTION where FUNCTION_NAME = 'roster.viewofficialphoto'));
 INSERT INTO SAKAI_REALM_RL_FN VALUES((select REALM_KEY from SAKAI_REALM where REALM_ID = '!site.template.portfolio'), (select ROLE_KEY from SAKAI_REALM_ROLE where ROLE_NAME = 'Reviewer'), (select FUNCTION_KEY from SAKAI_REALM_FUNCTION where FUNCTION_NAME = 'roster.viewprofile'));
-
 -- end SAK-18370
 
 -- SAK-17206
-alter table POLL_OPTION add DELETED number(1,0) DEFAULT NULL;
+alter table POLL_OPTION add DELETED number(1,0) DEFAULT NULL;

-- delete from SAKAI_REALM_RL_FN where function_key = (select function_key From SAKAI_REALM_FUNCTION where function_name = 'osp.matrix.scaffolding.use');
-- delete From SAKAI_REALM_FUNCTION where function_name = 'osp.matrix.scaffolding.use';


create table permissions_backfill_src_temp (function_name varchar2(99), TYPE INTEGER);
CREATE TABLE permissions_backfill_temp (FUNCTION_KEY INTEGER, TYPE INTEGER);

    CONFIRMED_DATE date,
    primary key (ID)
);

create table PROFILE_IMAGES_EXTERNAL_T (
    USER_UUID varchar2(99) not null,
    URL_MAIN varchar2(4000) not null,
    URL_THUMB varchar2(4000),
    primary key (USER_UUID)
);

create table PROFILE_IMAGES_T (
    ID number(19,0) not null,
    USER_UUID varchar2(99) not null,
