Fenixedu-academic 4.0 is a major cleanup of the academic core, many domains not considered part of this conception were moved out, or deleted entirely. As a result, the migration includes a great number of choices, depending on keeping or removing the extracted domains, many of them specific to the IST requirements and not easily applied to other institutions.
In summary, the cms was taken out, and also the following domains: giaf contracts, teacher credits and evaluation, delegates, tutorship, exam vigilancies, quc, library occupations, online tests, parts of pre-bolonha. Also, the organization is no longer a core concept.
Besides cleanups, Fenixedu-academic is also the first version to use oddjet (a openoffice based report templating system) for its reports.
-
Run the follwing script to ensure proper initialization of UserProfiles and LoginPeriods: BootstrapProfiles.java
-
Roles are no more. To ensure that previously existing roles are migrated to the new group-based method, you should create Dynamic Groups with the appropriate people. You can find an example script CreateRoleGroups.java.
-
Many groups were moved out or deleted entirely. To ensure all instances of those are used no more run the following script: ClearDeletedGroupRelations.java. The script assumes that you will drop all moved out or deleted domains, if not, comment the removals of groups and roles you are keeping.
-
Run ExportTeacherAuthorizations and keep the output file.
-
Run ExportAcademicAuthorizations and keep the output file.
-
Run ExportUnitCoordinators and keep the output file.
-
The framework now supports many IDs for the same domain type, run the following to ready the table for that
alter table FF$DOMAIN_CLASS_INFO drop index U1, add index (DOMAIN_CLASS_NAME);
-
If you wish to drop the CMS entirely follow these instructions:
DELETE FROM GENERIC_FILE where ((OID >> 32) & 0xFFFF) in (SELECT DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.FileContent', 'net.sourceforge.fenixedu.domain.messaging.PublicBoardFileContent', 'net.sourceforge.fenixedu.domain.UnitSiteBannerFile', 'net.sourceforge.fenixedu.domain.UnitSiteFile' )); delete from PERSISTENT_GROUP where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.accessControl.PersistentManagersOfUnitSiteGroup' ));
-
If you to drop the ist-legacy module run the following
delete from QUEUE_JOB where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.accounting.events.export.SIBSOutgoingPaymentQueueJob', 'net.sourceforge.fenixedu.domain.student.importation.DgesBaseProcess', 'net.sourceforge.fenixedu.domain.student.importation.DgesStudentImportationProcess', 'net.sourceforge.fenixedu.domain.student.importation.ExportDegreeCandidaciesByDegreeForPasswordGeneration', 'net.sourceforge.fenixedu.domain.student.importation.ExportExistingStudentsFromImportationProcess' )); delete from GENERIC_FILE where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.accounting.events.export.DebtsFile', 'net.sourceforge.fenixedu.domain.accounting.events.export.SIBSOutgoingPaymentFile', 'net.sourceforge.fenixedu.domain.student.importation.DgesStudentImportationFile', 'net.sourceforge.fenixedu.domain.UnitFile' )); delete from PERSISTENT_GROUP where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.accessControl.PersistentMembersLinkGroup' ));
-
To drop QUC inquiries
delete from DOMAIN_OPERATION_LOG where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.QUCResultsLog' )); delete from GENERIC_FILE where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.inquiries.ExecutionCourseAuditFile' ));
-
To drop Delegates
delete from SENDER where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.util.email.PersonFunctionSender' )); delete from PERSISTENT_GROUP where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.accessControl.PersistentDelegatesGroup', 'net.sourceforge.fenixedu.domain.accessControl.PersistentDelegateStudentsGroup' ));
-
To drop Online tests
delete from EVALUATION where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.onlineTests.OnlineTest' ));
-
To drop Teacher Credits
delete from GENERIC_FILE where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.TeacherCreditsDocument', 'net.sourceforge.fenixedu.domain.credits.AnnualTeachingCreditsDocument' )); delete from ACADEMIC_CALENDAR_ENTRY where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.time.calendarStructure.TeacherCreditsFillingCE', 'net.sourceforge.fenixedu.domain.time.calendarStructure.TeacherCreditsFillingForTeacherCE', 'net.sourceforge.fenixedu.domain.time.calendarStructure.TeacherCreditsFillingForDepartmentAdmOfficeCE' )); delete from QUEUE_JOB where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.reports.TeachersByShiftReportFile', 'net.sourceforge.fenixedu.domain.reports.TimetablesReportFile', 'net.sourceforge.fenixedu.domain.reports.TeachersListFromGiafReportFile', 'net.sourceforge.fenixedu.domain.reports.TeacherCreditsReportFile', 'net.sourceforge.fenixedu.domain.reports.EffectiveTeachingLoadReportFile', 'net.sourceforge.fenixedu.domain.TeacherCreditsQueueJob', 'net.sourceforge.fenixedu.domain.credits.CreditsPersonFunctionsSharedQueueJob', 'net.sourceforge.fenixedu.domain.PublicRelationsStudentListQueueJob' ));
-
To drop teacher evaluation
delete from GENERIC_FILE where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.teacher.evaluation.TeacherEvaluationFile' ));
-
To drop Tutorship
update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Unit' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.TutorUnit'; delete from DOMAIN_OPERATION_LOG where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.ProgramTutoredParticipationLog' )); delete from QUEUE_JOB where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.reports.TutorshipProgramReportFile', 'net.sourceforge.fenixedu.domain.TutorshipStudentLowPerformanceQueueJob', 'net.sourceforge.fenixedu.domain.StudentHighPerformanceQueueJob' ));
-
To drop employee and contract information from giaf
delete from PERSISTENT_GROUP where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.accessControl.PersistentResearchAuthorGroup', 'net.sourceforge.fenixedu.domain.accessControl.PersistentCampusEmployeeGroup' )); delete from PERSISTENT_GROUP where STRATEGY = 'net.sourceforge.fenixedu.domain.accessControl.DepartmentPresidentStrategy'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.AccountabilityType' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Function'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.AccountabilityType' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.SharedFunction'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Contract'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.EmployeeContract'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.ExternalContract'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.ResearchContract'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.ResearcherContract'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.ResearchScholarshipContract'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.ResearchTechnicalStaffContract'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.ResearchInternshipContract'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Invitation'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.PersonFunction'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Accountability' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.PersonFunctionShared'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.Unit' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.organizationalStructure.ResearchUnit'; delete from SENDER where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.util.email.ResearchUnitBasedSender'); alter table `PHD_MIGRATION_GUIDING` change TEACHER_NUMBER `TEACHER_ID` text;
-
To drop vigilancies:
delete from PERSISTENT_GROUP where ((OID >> 32) & 0xFFFF) in (select DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ( 'net.sourceforge.fenixedu.domain.accessControl.PersistentVigilancyGroup' ));
-
Run the following SQL instructions:
-- Photo availability extracted from CMS domain alter table `PARTY` add `PHOTO_AVAILABLE` tinyint(1); update PARTY join SITE on PARTY.OID_HOMEPAGE = SITE.OID set PARTY.PHOTO_AVAILABLE = SITE.SHOW_PHOTO; alter table `EXECUTION_COURSE` add `EMAIL` text, add `SITE_URL` text, add `DYNAMIC_MAIL_DISTRIBUTION` tinyint(1), add `LESSON_PLANNING_AVAILABLE` tinyint(1); update EXECUTION_COURSE join SITE on SITE.OID = EXECUTION_COURSE.OID_SITE set EMAIL = SITE.MAIL; update EXECUTION_COURSE join SITE on SITE.OID = EXECUTION_COURSE.OID_SITE set EXECUTION_COURSE.LESSON_PLANNING_AVAILABLE = SITE.LESSON_PLANNING_AVAILABLE; -- Replacing fenix group strategy with the one from bennu (assumes bennu's was never used) delete from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME = 'org.fenixedu.bennu.core.domain.groups.PersistentGroupStrategy'; update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = 'org.fenixedu.bennu.core.domain.groups.PersistentGroupStrategy' where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.accessControl.StrategyBasedGroup'; -- Remove old Login Periods delete from USER_LOGIN_PERIOD where ((OID >> 32) & 0xffff) = (SELECT DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME = 'org.fenixedu.bennu.user.management.UserLoginPeriod'); -- Removing old RegistrationAgreement rename table PROGRAM to MOBILITY_PROGRAM; -- Replacing all occurrences of istUsername to Username alter table ROLE_OPERATION_LOG change IST_USERNAME USERNAME mediumtext, change WHO_GRANTED_IST_USERNAME WHO_GRANTED_USERNAME mediumtext; alter table SPACE_ATTENDANCES change PERSON_IST_USERNAME PERSON_USERNAME mediumtext, change RESPONSIBLE_FOR_ENTRANCE_IST_USERNAME RESPONSIBLE_FOR_ENTRANCE_USERNAME mediumtext, change RESPONSIBLE_FOR_EXIT_IST_USERNAME RESPONSIBLE_FOR_EXIT_USERNAME mediumtext; -- Filling in Receipt contributors alter table `RECEIPT` add `CONTRIBUTOR_ADDRESS` text, add `CONTRIBUTOR_NUMBER` text; update RECEIPT join PARTY on PARTY.OID = RECEIPT.OID_CONTRIBUTOR_PARTY join USER_PROFILE on USER_PROFILE.OID = PARTY.OID_PROFILE left join PARTY_SOCIAL_SECURITY_NUMBER on PARTY_SOCIAL_SECURITY_NUMBER.OID = PARTY.OID_PARTY_SOCIAL_SECURITY_NUMBER left join PARTY_CONTACT on PARTY_CONTACT.OID_PARTY = PARTY.OID join FF$DOMAIN_CLASS_INFO on ((PARTY_CONTACT.OID >> 32) & 0xFFFF) = FF$DOMAIN_CLASS_INFO.DOMAIN_CLASS_ID set RECEIPT.CONTRIBUTOR_NAME = concat(USER_PROFILE.GIVEN_NAMES, ' ', USER_PROFILE.FAMILY_NAMES), RECEIPT.CONTRIBUTOR_NUMBER = PARTY_SOCIAL_SECURITY_NUMBER.SOCIAL_SECURITY_NUMBER, RECEIPT.CONTRIBUTOR_ADDRESS = concat(PARTY_CONTACT.ADDRESS, ' ', PARTY_CONTACT.AREA_CODE, ' ', PARTY_CONTACT.AREA_OF_AREA_CODE) where DOMAIN_CLASS_NAME = 'net.sourceforge.fenixedu.domain.contacts.PhysicalAddress'; -- Removing instances of CareerWorkshop File Subclasses DELETE FROM GENERIC_FILE where ((OID >> 32) & 0xFFFF) in (SELECT DOMAIN_CLASS_ID from FF$DOMAIN_CLASS_INFO where DOMAIN_CLASS_NAME in ('net.sourceforge.fenixedu.domain.careerWorkshop.CareerWorkshopSpreadsheet', 'net.sourceforge.fenixedu.domain.careerWorkshop.CareerWorkshopConfirmationSpreadsheet')); -- Migrate role groups alter table `PERSISTENT_GROUP` add `TARGET_GROUP` text; update PERSISTENT_GROUP join ROLE on PERSISTENT_GROUP.OID_ROLE = ROLE.OID set PERSISTENT_GROUP.TARGET_GROUP = concat('role(', concat(ROLE.ROLE_TYPE, ')')); delete from PERSISTENT_GROUP where OPERATION = 'MANAGE_CONTRIBUTORS'; -- Teacher authorizations delete from TEACHER_AUTHORIZATION; -- Contacts alter table `BENNU` add `OID_CONTACT_ROOT` bigint unsigned; alter table `PERSISTENT_GROUP` add `OID_CONTACT_ROOT_FOR_MANAGEMENT_VISIBILITY` bigint unsigned, add `OID_CONTACT_ROOT_FOR_STUDENT_VISIBILITY` bigint unsigned, add `OID_CONTACT_ROOT_FOR_EMERGENCY_CONTACT_VISIBILITY` bigint unsigned, add `OID_CONTACT_ROOT_FOR_STAFF_VISIBILITY` bigint unsigned; create table `CONTACT_ROOT` (`OID_STUDENT_VISIBILITY_GROUP` bigint unsigned, `OID_STAFF_VISIBILITY_GROUP` bigint unsigned, `OID_MANAGEMENT_VISIBILITY_GROUP` bigint unsigned, `OID_DOMAIN_META_OBJECT` bigint unsigned, `OID_ROOT` bigint unsigned, `OID` bigint unsigned, `OID_EMERGENCY_CONTACT_VISIBILITY_GROUP` bigint unsigned, primary key (OID), index (OID)) ENGINE=InnoDB, character set utf8; select @contact_root_id:=max(DOMAIN_CLASS_ID) + 1 from FF$DOMAIN_CLASS_INFO; select @bennu_id:=OID from BENNU; select @nobody_id:=OID from PERSISTENT_GROUP join FF$DOMAIN_CLASS_INFO on DOMAIN_CLASS_ID = ((OID >> 32) & 0xFFFF) where DOMAIN_CLASS_NAME = 'org.fenixedu.bennu.core.domain.groups.PersistentNobodyGroup'; insert into FF$DOMAIN_CLASS_INFO (DOMAIN_CLASS_NAME, DOMAIN_CLASS_ID) values ('org.fenixedu.academic.domain.contacts.ContactRoot', @contact_root_id); insert into CONTACT_ROOT (OID, OID_ROOT, OID_STUDENT_VISIBILITY_GROUP, OID_STAFF_VISIBILITY_GROUP, OID_MANAGEMENT_VISIBILITY_GROUP, OID_EMERGENCY_CONTACT_VISIBILITY_GROUP) values (@contact_root_id << 32, @bennu_id, @nobody_id, @nobody_id, @nobody_id, @nobody_id); update BENNU set OID_CONTACT_ROOT = @contact_root_id << 32; update PERSISTENT_GROUP set OID_CONTACT_ROOT_FOR_MANAGEMENT_VISIBILITY = @contact_root_id << 32, OID_CONTACT_ROOT_FOR_STUDENT_VISIBILITY = @contact_root_id << 32, OID_CONTACT_ROOT_FOR_EMERGENCY_CONTACT_VISIBILITY = @contact_root_id << 32, OID_CONTACT_ROOT_FOR_STAFF_VISIBILITY = @contact_root_id << 32 where OID = @nobody_id; alter table `PARTY_CONTACT` add `OID_CONTACT_ROOT` bigint unsigned, change VISIBLE_TO_TEACHERS `VISIBLE_TO_STAFF` tinyint(1), add index (OID_CONTACT_ROOT); update PARTY_CONTACT set OID_CONTACT_ROOT = @contact_root_id << 32; alter table `PARTY_CONTACT_VALIDATION` add `OID_CONTACT_ROOT` bigint unsigned, add index (OID_CONTACT_ROOT); update PARTY_CONTACT_VALIDATION set OID_CONTACT_ROOT = @contact_root_id << 32; -- Replace log relations from Employee to User alter table `GRATUITY_SITUATION` add `OID_PENALTY_EXEMPTION_USER` bigint unsigned, add index (OID_PENALTY_EXEMPTION_USER); update GRATUITY_SITUATION join EMPLOYEE on EMPLOYEE.OID = GRATUITY_SITUATION.OID_EMPLOYEE join PARTY on PARTY.OID = EMPLOYEE.OID_PERSON join USER on USER.OID = PARTY.OID_USER set OID_PENALTY_EXEMPTION_USER = USER.OID; -- change GuiderId from employee number to username (ignore guiderId that starts with 'E') ALTER TABLE `PHD_MIGRATION_GUIDING` CHANGE `TEACHER_NUMBER` `TEACHER_ID` text;
UPDATE PHD_MIGRATION_GUIDING
AS PMG INNER JOIN EMPLOYEE
E ON PMG.TEACHER_ID = E.EMPLOYEE_NUMBER INNER JOIN PARTY
P ON E.OID_PERSON = P.OID INNER JOIN USER
U ON P.OID_USER = U.OID SET PMG.TEACHER_ID = U.USERNAME WHERE INSTR(PMG.TEACHER_ID, 'E') <> 1;
-- Rebranding
update FF$DOMAIN_CLASS_INFO set DOMAIN_CLASS_NAME = replace(DOMAIN_CLASS_NAME, 'net.sourceforge.fenixedu.domain', 'org.fenixedu.academic.domain');
update PERSISTENT_GROUP set STRATEGY = replace(STRATEGY, 'net.sourceforge.fenixedu.domain', 'org.fenixedu.academic.domain');
update DEGREE_CONTEXT set PERIOD = replace(PERIOD, 'net.sourceforge.fenixedu.domain', 'org.fenixedu.academic.domain');
update CURRICULAR_PERIOD set ACADEMIC_PERIOD = replace(ACADEMIC_PERIOD, 'net.sourceforge.fenixedu.domain', 'org.fenixedu.academic.domain');
update CURRICULAR_RULE set ACADEMIC_PERIOD = replace(ACADEMIC_PERIOD, 'net.sourceforge.fenixedu.domain', 'org.fenixedu.academic.domain');
update COMPETENCE_COURSE_LOAD set ACADEMIC_PERIOD = replace(ACADEMIC_PERIOD, 'net.sourceforge.fenixedu.domain', 'org.fenixedu.academic.domain');
update PERSISTENT_GROUP set ON_CURRENT_PERIOD = replace(ON_CURRENT_PERIOD, 'net.sourceforge.fenixedu.domain', 'org.fenixedu.academic.domain');
--- now using bennu-oauth module
RENAME TABLE `AUTH_SCOPE` TO `EXTERNAL_APPLICATION_SCOPE`;
ALTER TABLE `EXTERNAL_APPLICATION_SCOPE` ADD COLUMN `SCOPE_KEY` text;
ALTER TABLE `EXTERNAL_APPLICATION_SCOPE` ADD COLUMN `DESCRIPTION` text;
ALTER TABLE `EXTERNAL_APPLICATION_SCOPE` ADD COLUMN `SERVICE` tinyint(1);
ALTER TABLE `EXTERNAL_APPLICATION` CHANGE COLUMN `OID_ROOT_DOMAIN_OBJECT` `OID_BENNU` bigint(20) unsigned DEFAULT NULL;
ALTER TABLE `EXTERNAL_APPLICATION_SCOPE` CHANGE COLUMN `OID_ROOT_DOMAIN_OBJECT` `OID_BENNU` bigint(20) unsigned DEFAULT NULL;
ALTER TABLE `EXTERNAL_APPLICATION_SCOPE` DROP COLUMN `ENDPOINTS`;
ALTER TABLE `PERMISSIONS_SCOPE` CHANGE COLUMN `OID_AUTH_SCOPE` `OID_EXTERNAL_APPLICATION_SCOPE` bigint(20) unsigned NOT NULL DEFAULT '0';
RENAME TABLE `APP_USER_SESSION` TO `APPLICATION_USER_SESSION`;
RENAME TABLE `APP_USER_AUTHORIZATION` TO `APPLICATION_USER_AUTHORIZATION`;
ALTER TABLE `APPLICATION_USER_SESSION` CHANGE COLUMN `OID_APP_USER_AUTHORIZATION` `OID_APPLICATION_USER_AUTHORIZATION` bigint(20) unsigned DEFAULT NULL;
UPDATE `FF$DOMAIN_CLASS_INFO` SET DOMAIN_CLASS_NAME = "org.fenixedu.bennu.oauth.domain.ExternalApplication" WHERE DOMAIN_CLASS_NAME = "org.fenixedu.academic.domain.ExternalApplication";
UPDATE `FF$DOMAIN_CLASS_INFO` SET DOMAIN_CLASS_NAME = "org.fenixedu.bennu.oauth.domain.ExternalApplicationScope" WHERE DOMAIN_CLASS_NAME = "org.fenixedu.academic.domain.AuthScope";
UPDATE `FF$DOMAIN_CLASS_INFO` SET DOMAIN_CLASS_NAME = "org.fenixedu.bennu.oauth.domain.ApplicationUserSession" WHERE DOMAIN_CLASS_NAME = "org.fenixedu.academic.domain.AppUserSession";
UPDATE `FF$DOMAIN_CLASS_INFO` SET DOMAIN_CLASS_NAME = "org.fenixedu.bennu.oauth.domain.ApplicationUserAuthorization" WHERE DOMAIN_CLASS_NAME = "org.fenixedu.academic.domain.AppUserAuthorization";
UPDATE EXTERNAL_APPLICATION_SCOPE SET SCOPE_KEY = UPPER(NAME);
UPDATE EXTERNAL_APPLICATION_SCOPE SET SERVICE = 0;
UPDATE EXTERNAL_APPLICATION_SCOPE SET NAME = UNHEX('7B2270742D505422203A2022506167616D656E746F73222C2022656E2D474222203A20225061796D656E7473227D') WHERE SCOPE_KEY = "PAYMENTS";
UPDATE EXTERNAL_APPLICATION_SCOPE SET NAME = UNHEX('7B2270742D505422203A2022496E666F726D61C3A7C3A36F222C2022656E2D474222203A2022496E666F726D6174696F6E227D') WHERE SCOPE_KEY = "INFO";
UPDATE EXTERNAL_APPLICATION_SCOPE SET NAME = UNHEX('7B2270742D505422203A20224176616C6961C3A7C3B56573222C2022656E2D474222203A20224576616C756174696F6E73227D') WHERE SCOPE_KEY = "EVALUATIONS";
UPDATE EXTERNAL_APPLICATION_SCOPE SET NAME = UNHEX('7B2270742D505422203A2022486F72C3A172696F222C2022656E2D474222203A20225363686564756C65227D') WHERE SCOPE_KEY = "SCHEDULE";
UPDATE EXTERNAL_APPLICATION_SCOPE SET NAME = UNHEX('7B2270742D505422203A2022437572726963756C6172222C2022656E2D474222203A2022437572726963756C756D227D') WHERE SCOPE_KEY = "CURRICULAR";
UPDATE EXTERNAL_APPLICATION_SCOPE set DESCRIPTION = UNHEX('7B2270742D505422203A2022496E666F726D61C3A7C3A36F20646520706167616D656E746F7320652064C3AD7669646173222C2022656E2D474222203A2022496E666F726D6174696F6E2061626F7574207061796D656E747320616E642064656274732E227D') where SCOPE_KEY = "PAYMENTS";
UPDATE EXTERNAL_APPLICATION_SCOPE set DESCRIPTION = UNHEX('7B2270742D505422203A2022496E666F726D61C3A7C3A36F20706573736F616C2070C3BA626C6963613A206E6F6D652C207365786F2C2064617461206465206E617363696D656E746F2C20656D61696C732C206973742D69642C20666F746F67726166696120652070C3A167696E61207765622E222C2022656E2D474222203A2022596F7572207075626C696320706572736F6E616C20696E666F726D6174696F6E3A206E616D652C2067656E6465722C20626972746864617920656D61696C732C206973742D69642C2070686F746F20616E642077656220706167652E227D') where SCOPE_KEY = "INFO";
UPDATE EXTERNAL_APPLICATION_SCOPE set DESCRIPTION = UNHEX('7B2270742D505422203A2022496E666F726D61C3A7C3A36F206520696E73637269C3A7C3A36F20616F732073657573207465737465732065206578616D65732E222C2022656E2D474222203A2022496E666F726D6174696F6E2061626F757420796F757220746573747320616E64206578616D732E227D') where SCOPE_KEY = "EVALUATIONS";
UPDATE EXTERNAL_APPLICATION_SCOPE set DESCRIPTION = UNHEX('7B2270742D505422203A2022496E666F726D61C3A7C3A36F20736F627265206F2073657520686F72C3A172696F20652063616C656E64C3A172696F206573636F6C61722E222C2022656E2D474222203A2022496E666F726D6174696F6E2061626F757420796F75722061636164656D6963207363686564756C6520616E642063616C656E6461722E227D') where SCOPE_KEY = "SCHEDULE";
UPDATE EXTERNAL_APPLICATION_SCOPE set DESCRIPTION = UNHEX('7B2270742D505422203A2022496E666F726D61C3A7C3A36F20637572726963756C61723A20636164656972617320696E736372697461732F61206C6563696F6E61722E222C2022656E2D474222203A2022437572726963756C617220696E666F726D6174696F6E3A20656E726F6C6C65642F7465616368696E6720636F75727365732E227D') where SCOPE_KEY = "CURRICULAR";
```
-
Start the application normally.
-
Run the following script to initialize Administrative Offices and University Units: InitializeUnitCoordinatorsAndOffices.java
-
Run the following script to import the academic authorization rules: ImportAcademicAuthorizationRules.java
-
Run the following script to import the teacher authorizations: ImportTeacherAuthorization.java
-
Run the following script to fix external applications logo FixExternalAppsLogoTask.java