CREATE TABLE `student_map` (
  `serial_smp` INT NOT NULL,
  `serial_scy` INT NULL,
  `serial_std` INT NULL,
  `name_smp` TEXT NULL,
  `status_smp` ENUM('ACTIVE', 'INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_smp`),
  INDEX `fk_smp_scy_idx` (`serial_scy` ASC),
  INDEX `fk_smp_std_idx` (`serial_std` ASC),
  CONSTRAINT `fk_smp_scy`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_smp_std`
    FOREIGN KEY (`serial_std`)
    REFERENCES `student` (`serial_std`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
	
ALTER TABLE `student_map` 
CHANGE COLUMN `serial_smp` `serial_smp` INT(11) NOT NULL AUTO_INCREMENT ;

INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('628', '199', 'Map', 'laravel/public/map', '1', 'LOCKABLE');
insert into allowed_pages_by_process values('628','mapcontroller@getindex');
insert into allowed_pages_by_process values('628','mapcontroller@getstudents');