
-- tipo de nivel
ALTER TABLE `level_section_year_specialty_ministry_name`
ADD COLUMN `type_level` ENUM('PRIMARY', 'HIGHSCHOOL') NOT NULL DEFAULT 'PRIMARY' AFTER `status_lssm`;

-- jornada
ALTER TABLE `level_section_year_specialty_ministry_name`
ADD COLUMN `working_day` VARCHAR(45) NOT NULL DEFAULT 'MATUTINA' AFTER `type_level`;

-- ingresa o no calificaciones
ALTER TABLE `ministry_subject`
ADD COLUMN `has_grade_msb` INT(11) NOT NULL DEFAULT 1 AFTER `status_msb`;

-- ISAAC NEWTON
-- parametro para mostrar materias hijas en reportes del ministerio
ALTER TABLE `subject_ministry_equivalence`
ADD COLUMN `is_child_sme` ENUM('YES', 'NO') NOT NULL DEFAULT 'NO' ;

-- parametro para obtener el promedio anual en materias hijas y en base a este
ALTER TABLE `subject`
ADD COLUMN `independent_child_avg` ENUM('YES', 'NO') NOT NULL DEFAULT 'NO' AFTER `order_sbj`;

-- parametro para verificar si la materia padre tiene hijas con promedio independiente, campo que se llenará por cron anual
ALTER TABLE `student_subject_year_average`
ADD COLUMN `has_independent_child` ENUM('YES', 'NO') NOT NULL DEFAULT 'NO' AFTER `subject_type_sya`;

-- allowed
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'coursecontroller@getallbysectionoptions');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'sectioncontroller@getsectionsbyschoolyearoptions');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postperiodreport');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postfinalperiodsgradesbycourse');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postfinalgradesbycourse');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postregistrationreport');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@poststudentministrycompletedegb');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postpromotionreport');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postaptitudereport');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postfinalgradesbycoursecustom');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postperiodreportcustom');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postpromotionareareport');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postaptitudeareareport');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@getindex');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@getstudentsbycourse');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@getstudentsbycourseforcomments');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@getstudentsbycourseforcommentsperiod');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@getperiodgrade');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@getyearaveragebyministrysubjectandstudent');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@getfinalaveragestudentministry');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@getreportcardmethodconfigured');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postcourseconfigured');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postcheckifministrysubjectisconfigured');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postsearchstudent');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@poststudentdetail');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@getisapproved');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postperiodreportbase');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postfinalgradesbycoursebase');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postpromotionreportbase');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postpromotionareareportbase');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'ministryreportscontroller@postfinalgradesbycoursecustom2');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postperiodreport17d08');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postfinalgradesbycoursecustom17d08');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postaptitudeareareport17d08');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postperiodreport17d09');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postfinalgradesbycourse17d09');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postpromotionreport17d09');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postpromotionreport17d05');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postfinalgradesbycourse17d05');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postperiodreport17d05');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postfinalperiodsgradesbycourse17d05');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postaptitudereport17d09');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postaptitudeareareport17d09');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'reportscontroller17d02@postpromotionreport17d02');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'reportscontroller17d02@postperiodreport17d02');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'reportscontroller17d02@postfinalgradesbycourse17d02');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postperiodreport17d05custom');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postfinalgradesbycourse17d05custom');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postpromotionreport17d08');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'ministryreportscontroller@postfinalgradesbycoursemanypages17d05');
insert into allowed_pages_by_process (`serial_prc`,`url_dsc`) values(630,'reportscontroller17d03@postpromotionreport17d03');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d02@postpromotionreport17d02');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d02@postperiodreport17d02');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d02@postfinalgradesbycourse17d02');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d09@postpromotionreport17d09');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d09@postperiodreport17d09');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d09@postfinalgradesbycourse17d09');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d05@postperiodreport17d05');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d05@postfinalgradesbycourse17d05');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d05@postaptitudeareareport17d05_2');
INSERT INTO `allowed_pages_by_process` (`serial_prc`,`url_dsc`) VALUES (630,'reportscontroller17d05@postpromotionreport17d05withfooter');


ALTER TABLE `school_year`
ADD COLUMN `discipline_max_grade_scy` DECIMAL(6,2) NOT NULL DEFAULT 10 AFTER `school_max_grade_scy`;
