set SQL_SAFE_UPDATES=0;
-- configurar campo options de school stup según el colegio

-- Proceso de admisiones prc_serial_prc = 52 viene usuarios

insert into process(serial_prc, prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (673,52,'Proceso de admisiones','#',103.00,'LOCKABLE', null);


insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (674,673,'Informes','#',5.00,'LOCKABLE', null); -- proceso padre

	insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
	values (675,674,'Informe económico','laravel/public/reportsAdmission/createeconomic',5.00,'LOCKABLE', null);

	insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
	values (676,674,'Informe entrevista','laravel/public/reportsAdmission/createinterview',4.00,'LOCKABLE', null);

	insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
	values (677,674,'Informe psicológico','laravel/public/reportsAdmission/createpsychological',1.00,'LOCKABLE', null);

	insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
	values (678,674,'Informe notas','laravel/public/reportsAdmission/createassistant',2.00,'LOCKABLE', null);

	insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
	values (679,674,'Informe académico aspirante','laravel/public/reportsAdmission/createdirector',3.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (680,673,'Restablecer contraseña','laravel/public/resetPass/index',8.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (681,673,'Fechas de nacimiento por nivel','laravel/public/BirthdateLevel/index',9.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (682,673,'Recepción de documentos','laravel/public/Admission/create-reception-documents',4.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (683,673,'Nueva aplicación','laravel/public/Admission/create',1.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (684,673,'Colecturía','laravel/public/Bursar/create',10.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (685,673,'Modificar aplicación','laravel/public/Admission/modify',2.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (686,673,'Comisiones de admisiones','laravel/public/Committe/create',6.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (687,673,'Completar informacion de aspirante','laravel/public/Admission/alias-login',3.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (688,673,'Reportes de admisiones','laravel/public/admissionReports/report-with-informs',7.00,'LOCKABLE', null);

insert into process(serial_prc,prc_serial_prc, name_prc, link_prc, weight_prc, status_prc, id_exclusion)
values (689,673,'Inactivar Aspirante','laravel/public/Admission/inactive-aspirant',11.00,'LOCKABLE', null);

-- allowed process
-- Informe económico
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (675,'reportsadmissioncontroller@getcreateeconomic');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (675,'reportsadmissioncontroller@postcreateeconomic');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (675,'reportsadmissioncontroller@postcontext');

-- Informe entrevista
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (676,'reportsadmissioncontroller@getcreateinterview');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (676,'reportsadmissioncontroller@postcreateinterview');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (676,'reportsadmissioncontroller@postcontext');

-- Informe psicológico
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (677,'reportsadmissioncontroller@getcreatepsychological');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (677,'reportsadmissioncontroller@postcreatepsychological');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (677,'reportsadmissioncontroller@postcontext');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (677,'reportsadmissioncontroller@postschoolyearaspirants');

-- Informe notas
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (678,'reportsadmissioncontroller@getcreateassistant');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (678,'reportsadmissioncontroller@getcreatedirector');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (678,'reportsadmissioncontroller@postcontextaspirant');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (678,'reportsadmissioncontroller@postcontext');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (678,'reportsadmissioncontroller@postcontextacademic');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (678,'reportsadmissioncontroller@postsectionsnotesreport');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (678,'reportsadmissioncontroller@postcreateassistant');

-- Informe académico aspirante
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (679,'reportsadmissioncontroller@postcontextaspirant');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (679,'reportsadmissioncontroller@postcontextacademic');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (679,'reportsadmissioncontroller@postcreatedirector');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (679,'reportsadmissioncontroller@postcontext');

-- Restablecer contraseña
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (680,'resetpasscontroller@getindex');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (680,'resetpasscontroller@postcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (680,'resetpasscontroller@postsearchrepresent');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (680,'resetpasscontroller@getsearchaspirant');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (680,'resetpasscontroller@postcheckemailunique');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (680,'resetpasscontroller@postcheckemailunique');

-- Fechas de nacimiento por nivel
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (681,'birthdatelevel@getindex');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (681,'birthdatelevel@postcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (681,'birthdatelevel@postorderlevesection');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (681,'birthdatelevel@postcheck');

-- Recepción de documentos
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@getcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@getcreatedataadmission');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@getrecreatedataadmission');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postcreatedataadmission');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@getcreatereceptiondocuments');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postcreatereceptiondocuments');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postcontextreception');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@getcontextschool');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postcontextguardian');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postcontextaspirant');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postcontextlevel');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postcontextstudent');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postsearchaspirant');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postaddinst');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postsearchaspirantrepeat');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postinactiveadmission');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (682,'admissioncontroller@postvalidatebirthdate');

-- Nueva aplicación
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@getcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@postcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@getcreatedataadmission');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@postaspirants');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@postcheckciuniqueaspirant');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@postvalidatebirthdate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@getcontextschool');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@postsearchaspirantguardianforci');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@postcreatedataadmission');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@postsearchaspirant');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'familycontroller@postfamilybyid');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@postcontextaspirantfamily');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (683,'admissioncontroller@postcontextstudent');


-- Colecturía
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (684,'bursarcontroller@getcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (684,'bursarcontroller@postcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (684,'bursarcontroller@postcontext');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (684,'bursarcontroller@postaspirantsreadypayment');

-- Modificar aplicación
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (685,'admissioncontroller@postcheckciunique');

-- Comisiones de admisiones
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (686,'committecontroller@getcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (686,'committecontroller@postcreate');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (686,'committecontroller@postcontext');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (686,'committecontroller@postcontextaspirantt');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (686,'committecontroller@postcontextstudent');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (686,'committecontroller@postaspirantsready');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (686,'committecontroller@postcontextpreviouseducation');

-- Completar informacion de aspirante
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (687,'admissioncontroller@getaliaslogin');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (687,'admissioncontroller@postaliaslogin');

-- Reportes de admisiones
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (688,'AdmissionReportController@postinformationadmissionreport');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (688,'AdmissionReportController@getreportwithinforms');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (688,'AdmissionReportController@postsectionlevelyear');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (688,'AdmissionReportController@poststudentsectionlevelyear');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (688,'AdmissionReportController@postgeneratepdf');

-- Inactivar Aspirante
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (689,'admissioncontroller@getinactiveaspirant');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (689,'admissioncontroller@postaspirantsbyschoolyear');
insert into allowed_pages_by_process(serial_prc, url_dsc)
values (689,'admissioncontroller@postinactiveaspirant');


ALTER TABLE `aspirant_guardian`
ADD COLUMN `graduate_degree1_asgu` VARCHAR(45) NULL DEFAULT NULL AFTER `university_degree_asgu`,
ADD COLUMN `university_degree1_asgu` VARCHAR(45) NULL DEFAULT NULL AFTER `graduate_degree1_asgu`;
ALTER TABLE `aspirant_guardian`
ADD COLUMN `exstudent` ENUM('YES', 'NO') NOT NULL DEFAULT 'NO';

ALTER TABLE `aspirant_student`
ADD COLUMN `status_asstu` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT 'ACTIVE';

-- Registros para el ingreso de informes en el proceso de admisiones
insert into type_report(serial_tyrp, name_report) values (1,'Economic');
insert into type_report(serial_tyrp, name_report) values (2,'Academic');
insert into type_report(serial_tyrp, name_report) values (3,'Psychologica');
insert into type_report(serial_tyrp, name_report) values (4,'Interview');

-- Según la configuración del colegio se debe registrar a las personas encagardas del proceso en la tabla
-- employee_section