CREATE TABLE  `exclusion_user` (
  `serial_exu` INT(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` INT(11) NOT NULL,
  `serial_prd` INT(11) NOT NULL,
  `serial_sbp` INT(11) NULL DEFAULT NULL,
  `serial_crs` INT(11) NULL DEFAULT NULL,
  `serial_emp` INT(11) NOT NULL,
  `serial_prc` INT(11) NOT NULL,
  `serial_csb` INT(11) NULL DEFAULT NULL,
  `serial_sbc` INT(11) NULL DEFAULT NULL,
  `serial_osb` INT(11) NULL DEFAULT NULL,
  `serial_sps` INT(11) NULL DEFAULT NULL,
  `date_exu` DATETIME NOT NULL,
  `date_inu` DATETIME NULL DEFAULT NULL,
  `status_exu` ENUM( 'ACTIVE', 'INACTIVE' ) NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_exu`),
  INDEX `fk_relationship_30000_idx` (`serial_scy` ASC),
  INDEX `fk_relationship_30001_idx` (`serial_sbp` ASC),
  INDEX `fk_relationship_30002_idx` (`serial_crs` ASC),
  INDEX `fk_relationship_30003_idx` (`serial_emp` ASC),
  INDEX `fk_relationship_30004_idx` (`serial_sbc` ASC),
  INDEX `fk_relationship_30005_idx` (`serial_osb` ASC),
  INDEX `fk_relationship_30006_idx` (`serial_sps` ASC),
  INDEX `fk_relationship_30007_idx` (`serial_prc` ASC),
  INDEX `fk_relationship_30008_idx` (`serial_prd` ASC),
  INDEX `fk_relationship_30009_idx` (`serial_csb` ASC),
  CONSTRAINT `fk_relationship_30000`
    FOREIGN KEY (`serial_scy`)
    REFERENCES  `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_30001`
    FOREIGN KEY (`serial_sbp`)
    REFERENCES  `subperiod` (`serial_sbp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_30002`
    FOREIGN KEY (`serial_crs`)
    REFERENCES  `course` (`serial_crs`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_30003`
    FOREIGN KEY (`serial_emp`)
    REFERENCES  `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_30004`
    FOREIGN KEY (`serial_sbc`)
    REFERENCES  `subject_course` (`serial_sbc`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_30005`
    FOREIGN KEY (`serial_osb`)
    REFERENCES  `optional_subject` (`serial_osb`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_30006`
    FOREIGN KEY (`serial_sps`)
    REFERENCES  `special_subject_course` (`serial_sps`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_30007`
    FOREIGN KEY (`serial_prc`)
    REFERENCES  `process` (`serial_prc`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_30008`
  FOREIGN KEY (`serial_prd`)
  REFERENCES `period` (`serial_prd`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_30009`
  FOREIGN KEY (`serial_csb`)
  REFERENCES `cat_subject` (`serial_csb`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION);