-- tabla listas negra 

CREATE TABLE `black_list_student_year` (
  `serial_bls` INT NOT NULL AUTO_INCREMENT,
  `serial_std` INT NULL,
  `serial_scy` INT NULL,
  `serial_usr` INT NULL,
  `date_bls` DATETIME NULL,
  `status_bls` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_bls`),
  INDEX `fk_bls_std_idx` (`serial_std` ASC),
  INDEX `fk_bls_scy_idx` (`serial_scy` ASC),
  INDEX `fk_bls_usr_idx` (`serial_usr` ASC),
  CONSTRAINT `fk_bls_std`
    FOREIGN KEY (`serial_std`)
    REFERENCES `student` (`serial_std`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_bls_scy`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_bls_usr`
    FOREIGN KEY (`serial_usr`)
    REFERENCES `user` (`serial_usr`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
	
	-- aumentar nombre del siguiente año lectivo
	ALTER TABLE `school_year` 
ADD COLUMN `next_name_scy` VARCHAR(45) NULL AFTER `show_improvement_plain_scy`;

-- menú y allowed_pages_by_process
INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('620', '52', 'Listas negras', 'laravel/public/blackList', '1.52', 'LOCKABLE');
insert into allowed_pages_by_process values('620','blacklistcontroller@getindex');
insert into allowed_pages_by_process values('620','blacklistcontroller@poststudents');
insert into allowed_pages_by_process values('620','blacklistcontroller@postsaveblakList');
