CREATE TABLE `inquiry_unit` (
  `serial_inu` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `serial_scy` INT NOT NULL,
  `serial_set` INT NOT NULL,
  `serial_spt` INT NOT NULL,
  `serial_lvl` INT NOT NULL,
  `unit_inu` VARCHAR(200) NOT NULL,
  `title_inu` VARCHAR(150) NOT NULL,
  `main_idea_inu` VARCHAR(250) NOT NULL,
  `inquiry_lines_inu` TEXT NULL,
  `status_inu` ENUM('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_inu`),
  INDEX `inquiry_unit_school_year_fk_idx` (`serial_scy` ASC),
  INDEX `inquiry_unit_section_fk_idx` (`serial_set` ASC),
  INDEX `inquiry_unit_specialty_fk_idx` (`serial_spt` ASC),
  INDEX `inquiry_unit_level_fk_idx` (`serial_lvl` ASC),
  CONSTRAINT `inquiry_unit_school_year_fk`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `inquiry_unit_section_fk`
    FOREIGN KEY (`serial_set`)
    REFERENCES `section` (`serial_set`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `inquiry_unit_specialty_fk`
    FOREIGN KEY (`serial_spt`)
    REFERENCES `specialty` (`serial_spt`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `inquiry_unit_level_fk`
    FOREIGN KEY (`serial_lvl`)
    REFERENCES `level` (`serial_lvl`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
