-- verificar si se autoriza  o no la dirección para transporte, fecha, usuario que actualiza los datos
ALTER TABLE `student_address` 
ADD COLUMN `serial_usr` INT NULL AFTER `serial_sta`,
ADD COLUMN `autorized_transport_sta` ENUM('YES', 'NO') NULL DEFAULT 'YES' AFTER `sector`,
ADD COLUMN `date_update_sta` DATETIME NULL AFTER `autorized_transport_sta`,
ADD INDEX `FK_student_has_user_idx` (`serial_usr` ASC);

ALTER TABLE `student_address` 
ADD CONSTRAINT `FK_student_has_user`
  FOREIGN KEY (`serial_usr`)
  REFERENCES `user` (`serial_usr`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

 -- para verificar si eesta o no habilidtada el pago de rubros
  ALTER TABLE `school_year` 
ADD COLUMN `enable_payment_scy` ENUM('YES', 'NO') NULL DEFAULT 'NO' AFTER `use_new_activities_calculus_scy`;

-- para poder agregar o quitar direcciones habilitadads
-- procesos Verificación de Pagos Habilitantes
-- url http://localhost/RUTADEMIC/DEV/laravel/public/check/index
-- controlador CheckController
-- verificar el numero de proceso antes de ingresar en la base

INSERT INTO `process` (serial_prc,`prc_serial_prc`, `name_prc`, `link_prc`) VALUES (495,'438', 'Verificación De Transporte', 'laravel/public/check/index');
insert into allowed_pages_by_process values(495,'checkcontroller@getindex');
insert into allowed_pages_by_process values(495,'checkcontroller@getautostudents');
insert into allowed_pages_by_process values(495,'checkcontroller@postchecktransport');
insert into allowed_pages_by_process values(495,'checkcontroller@poststudentaddresses');