--
-- Estructura de tabla para la tabla `period_subperiod_subject_skills`
--

CREATE TABLE IF NOT EXISTS `period_subperiod_subject_skills` (
  `serial_yss` int(11) NOT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_sbp` int(11) DEFAULT NULL,
  `status_psss` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_serial_yss_psss` (`serial_yss`),
  KEY `fk_relationship_serial_prd_psss` (`serial_prd`),
  KEY `fk_relationship_serial_sbp_psss` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Relaciones para la tabla `period_subperiod_subject_skills`
--
ALTER TABLE `period_subperiod_subject_skills`
  ADD CONSTRAINT `fk_relationship_serial_yss_psss` FOREIGN KEY (`serial_yss`) REFERENCES `year_subject_skills` (`serial_yss`),
  ADD CONSTRAINT `fk_relationship_serial_prd_psss` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  ADD CONSTRAINT `fk_relationship_serial_sbp_psss` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`);
  
