--
-- Estructura de tabla para la tabla `student_year_subject_criteria_grade`
--

CREATE TABLE IF NOT EXISTS `student_year_subject_criteria_grade` (
  `serial_syc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_osb` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_lsc` int(11) DEFAULT NULL,
  `status_syc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_syc`),
  KEY `fk_syc_serial_scy` (`serial_scy`),
  KEY `fk_syc_serial_sbc` (`serial_sbc`),
  KEY `fk_syc_serial_osb` (`serial_osb`),
  KEY `fk_syc_serial_lsc` (`serial_lsc`),
  KEY `fk_syc_serial_std` (`serial_std`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1;

--
-- Filtros para la tabla `student_year_subject_criteria_grade`
--
ALTER TABLE `student_year_subject_criteria_grade`
  ADD CONSTRAINT `fk_syc_serial_scy` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`),
  ADD CONSTRAINT `fk_syc_serial_sbc` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  ADD CONSTRAINT `fk_syc_serial_osb` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`),
  ADD CONSTRAINT `fk_syc_serial_lsc` FOREIGN KEY (`serial_lsc`) REFERENCES `level_skill_grade_criteria` (`serial_lsc`),
  ADD CONSTRAINT `fk_syc_serial_std` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`);