-- -----------------------------------------------------
-- Table `travel_changelog`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `travel_changelog` (
  `serial_trc` INT NOT NULL AUTO_INCREMENT,
  `serial_emp` INT(11) NULL,
  `serial_std` INT(11) NOT NULL,
  `serial_trv_from` INT NOT NULL,
  `serial_trv_to` INT NOT NULL,
  `current_date` DATETIME NOT NULL,
  `change_date` DATE NOT NULL,
  PRIMARY KEY (`serial_trc`),
  INDEX `fk_travel_changelog_employee1_idx` (`serial_emp` ASC),
  INDEX `fk_travel_changelog_travel1_idx` (`serial_trv_from` ASC),
  INDEX `fk_travel_changelog_travel2_idx` (`serial_trv_to` ASC),
  INDEX `fk_travel_changelog_student1_idx` (`serial_std` ASC),
  CONSTRAINT `fk_travel_changelog_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_travel_changelog_travel1`
    FOREIGN KEY (`serial_trv_from`)
    REFERENCES `travel` (`serial_trv`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_travel_changelog_travel2`
    FOREIGN KEY (`serial_trv_to`)
    REFERENCES `travel` (`serial_trv`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_travel_changelog_student1`
    FOREIGN KEY (`serial_std`)
    REFERENCES `student` (`serial_std`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;