INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`)
VALUES ('869', '151', 'Envío de Libretas', 'laravel/public/sendReportsGuardian', '999', 'LOCKABLE');
insert into allowed_pages_by_process values('869','SendReportsGuardianController@getIndex');
insert into allowed_pages_by_process values('869','BaseMethodsTemplateController@postDropDownSchoolYear');
insert into allowed_pages_by_process values('869','BaseMethodsTemplateController@postSectionDropdown');
insert into allowed_pages_by_process values('869','BaseMethodsTemplateController@postPeriodDropdown');
insert into allowed_pages_by_process values('869','BaseMethodsTemplateController@postSubperiodDropdown');
insert into allowed_pages_by_process values('869','SendReportsGuardianController@postSendReports');
insert into allowed_pages_by_process values('869','SendReportsGuardianController@postLoadCountingStudent');
insert into allowed_pages_by_process values('869','SendReportsGuardianController@postProgressBar');
insert into allowed_pages_by_process values('869','SendReportsGuardianController@postCreateRegister');



alter table section add column host_mail_set varchar(50) after color_set;
alter table section add column from_mail_set varchar(50) after host_mail_set;
alter table section add column user_mail_set varchar(50) after from_mail_set;
alter table section add column pswd_mail_set text after user_mail_set;
alter table section add column port_mail_set int(4) after pswd_mail_set;
alter table section add column ssl_mail_set enum('YES','NO') after port_mail_set;
alter table section add column tls_mail_set enum('YES','NO') after ssl_mail_set;

alter table student_year add column date_send_report datetime null after travel_month_sty;


CREATE TABLE process_progress_bar (
  `serial_ppb` INT NOT NULL AUTO_INCREMENT,
  `serial_usr` INT NOT NULL,
  `serial_prf` INT NOT NULL,
  `executed_ppb` INT NULL,
  `total_ppb` INT NULL,
  `percentage_ppb` DOUBLE NULL,
  `date_start_ppb` datetime NULL,
  `date_update_ppb` datetime NULL,
  `flag_ppb` varchar (75) NULL,
  `time_current_ppb` varchar (50) NULL,
  `token_ppb` varchar (250) NULL,
  `status_ppb` enum('ACTIVE','FINISHED','CANCELED') NULL,
  PRIMARY KEY (`serial_ppb`)
);


CREATE TABLE send_mail_reports (
  `serial_smr` INT NOT NULL AUTO_INCREMENT,
  `serial_usr` INT NOT NULL,
  `serial_prf` INT NOT NULL,
  `serial_scy` INT NOT NULL,
  `serial_set` INT NOT NULL,
  `serial_lvl` INT NOT NULL,
  `serial_prd` INT NOT NULL,
  `serial_sbp` INT NOT NULL,
  `serial_ppb` INT NOT NULL,
  `date_start_smr` datetime NULL,
  `date_end_smr` datetime NULL,
  `status_smr` enum('ACTIVE','IN_PROCESS','FINISHED','CANCELED') NULL,
  PRIMARY KEY (`serial_smr`)
);

alter table level_section_year_specialty add column send_report_student_lss enum('YES','NO') default 'NO' after use_for_transcript;


alter table level add column host_mail_lvl varchar(50) after status_lvl;
alter table level add column from_mail_lvl varchar(50) after host_mail_lvl;
alter table level add column user_mail_lvl varchar(50) after from_mail_lvl;
alter table level add column pswd_mail_lvl text after user_mail_lvl;
alter table level add column port_mail_lvl int(4) after pswd_mail_lvl;
alter table level add column ssl_mail_lvl enum('YES','NO') after port_mail_lvl;
alter table level add column tls_mail_lvl enum('YES','NO') after ssl_mail_lvl;