-- MySQL dump 10.13  Distrib 5.6.23, for Win64 (x86_64)
--
-- Host: 127.0.0.1    Database: rutatec2
-- ------------------------------------------------------
-- Server version	5.6.21

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `academic_area`
--

DROP TABLE IF EXISTS `academic_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `academic_area` (
  `serial_aca` int(11) NOT NULL AUTO_INCREMENT,
  `name_aca` varchar(150) NOT NULL,
  `description_aca` text NOT NULL,
  `status_aca` enum('ACTIVE','INACTIVE') NOT NULL,
  PRIMARY KEY (`serial_aca`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `academic_area`
--

LOCK TABLES `academic_area` WRITE;
/*!40000 ALTER TABLE `academic_area` DISABLE KEYS */;
/*!40000 ALTER TABLE `academic_area` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `academic_area_comment`
--

DROP TABLE IF EXISTS `academic_area_comment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `academic_area_comment` (
  `serial_aca` int(11) NOT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_sbp` int(11) DEFAULT NULL,
  `observation_aac` text,
  `approach_aac` text,
  KEY `fk_academic_area_comment_serial_aca` (`serial_aca`),
  KEY `fk_academic_area_comment_serial_prd` (`serial_prd`),
  KEY `fk_academic_area_comment_serial_sbp` (`serial_sbp`),
  CONSTRAINT `fk_academic_area_comment_serial_aca` FOREIGN KEY (`serial_aca`) REFERENCES `academic_area` (`serial_aca`),
  CONSTRAINT `fk_academic_area_comment_serial_prd` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  CONSTRAINT `fk_academic_area_comment_serial_sbp` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `academic_area_comment`
--

LOCK TABLES `academic_area_comment` WRITE;
/*!40000 ALTER TABLE `academic_area_comment` DISABLE KEYS */;
/*!40000 ALTER TABLE `academic_area_comment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `access_log`
--

DROP TABLE IF EXISTS `access_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `access_log` (
  `serial_alg` int(11) NOT NULL AUTO_INCREMENT,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_prf` int(11) DEFAULT NULL,
  `login_date_alg` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`serial_alg`),
  KEY `fk_relationship_143` (`serial_usr`,`serial_prf`),
  CONSTRAINT `fk_relationship_143` FOREIGN KEY (`serial_usr`, `serial_prf`) REFERENCES `user_profile` (`serial_usr`, `serial_prf`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `access_log`
--

LOCK TABLES `access_log` WRITE;
/*!40000 ALTER TABLE `access_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `access_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `activity`
--

DROP TABLE IF EXISTS `activity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `activity` (
  `serial_act` int(11) NOT NULL AUTO_INCREMENT,
  `name_act` varchar(256) NOT NULL,
  `description_act` text NOT NULL,
  `send_date_act` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `due_date_act` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `status_act` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_act`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `activity`
--

LOCK TABLES `activity` WRITE;
/*!40000 ALTER TABLE `activity` DISABLE KEYS */;
/*!40000 ALTER TABLE `activity` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `activity_trg` BEFORE UPDATE ON `activity` FOR EACH ROW BEGIN 

	IF NEW.status_act = 'INACTIVE' THEN

		

		UPDATE activity_applied_criterias aac

		SET aac.status_aac = 'INACTIVE'

		WHERE aac.serial_act = OLD.serial_act;

		

		UPDATE activity_attachment ath

		SET ath.status_ath = 'INACTIVE'

		WHERE ath.serial_act = OLD.serial_act;

	ELSEIF NEW.status_act = 'ACTIVE' AND OLD.status_act != NEW.status_act THEN

		

		UPDATE activity_applied_criterias aac

		SET aac.status_aac = 'ACTIVE'

		WHERE aac.serial_act = OLD.serial_act;

		

		UPDATE activity_attachment ath

		SET ath.status_ath = 'ACTIVE'

		WHERE ath.serial_act = OLD.serial_act

		AND ath.status_ath = 'INACTIVE';

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `activity_applied_criterias`
--

DROP TABLE IF EXISTS `activity_applied_criterias`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `activity_applied_criterias` (
  `serial_att` int(11) NOT NULL,
  `serial_prd` int(11) NOT NULL,
  `serial_sbc` int(11) NOT NULL,
  `serial_sbj` int(11) NOT NULL,
  `serial_gct` int(11) NOT NULL,
  `serial_act` int(11) NOT NULL,
  `weight_aac` decimal(5,2) NOT NULL,
  `status_aac` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_att`,`serial_prd`,`serial_sbc`,`serial_gct`,`serial_act`),
  KEY `fk_activity_header` (`serial_act`),
  KEY `fk_relationship_95` (`serial_att`,`serial_prd`,`serial_sbc`,`serial_sbj`,`serial_gct`),
  CONSTRAINT `fk_activity_header` FOREIGN KEY (`serial_act`) REFERENCES `activity` (`serial_act`),
  CONSTRAINT `fk_relationship_95` FOREIGN KEY (`serial_att`, `serial_prd`, `serial_sbc`, `serial_sbj`, `serial_gct`) REFERENCES `subject_year_activity_criteria_period` (`serial_att`, `serial_prd`, `serial_sbc`, `serial_sbj`, `serial_gct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `activity_applied_criterias`
--

LOCK TABLES `activity_applied_criterias` WRITE;
/*!40000 ALTER TABLE `activity_applied_criterias` DISABLE KEYS */;
/*!40000 ALTER TABLE `activity_applied_criterias` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `activity_applied_criterias_trg` BEFORE UPDATE ON `activity_applied_criterias` FOR EACH ROW BEGIN

	

	IF NEW.status_aac = 'INACTIVE' THEN

		UPDATE student_criteria_grade scg

		SET scg.status_scg = 'INACTIVE',

		    scg.grade_scg = NULL

		WHERE scg.serial_att = OLD.serial_att

		AND scg.serial_prd = OLD.serial_prd

		AND scg.serial_sbc = OLD.serial_sbc

		AND scg.serial_gct = OLD.serial_gct

		AND scg.serial_act = OLD.serial_act;

	ELSEIF NEW.status_aac = 'ACTIVE' AND  OLD.status_aac != NEW.status_aac THEN

	

		UPDATE student_criteria_grade scg

		SET scg.status_scg = 'ACTIVE'

		WHERE scg.serial_att = OLD.serial_att

		AND scg.serial_prd = OLD.serial_prd

		AND scg.serial_sbc = OLD.serial_sbc

		AND scg.serial_gct = OLD.serial_gct

		AND scg.serial_act = OLD.serial_act;

	

		UPDATE student_criteria_grade scg

		SET scg.is_complete_scg = 'NO'

		WHERE scg.serial_att = OLD.serial_att

		AND scg.serial_prd = OLD.serial_prd

		AND scg.serial_sbc = OLD.serial_sbc

		AND scg.serial_gct != OLD.serial_gct

		AND scg.serial_act = OLD.serial_act;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `activity_attachment`
--

DROP TABLE IF EXISTS `activity_attachment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `activity_attachment` (
  `serial_ath` int(11) NOT NULL AUTO_INCREMENT,
  `serial_act` int(11) DEFAULT NULL,
  `name_ath` varchar(256) NOT NULL,
  `filename_ath` varchar(256) NOT NULL,
  `status_ath` enum('ACTIVE','INACTIVE','DELETED') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ath`),
  KEY `fk_relationship_96` (`serial_act`),
  CONSTRAINT `fk_relationship_96` FOREIGN KEY (`serial_act`) REFERENCES `activity` (`serial_act`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `activity_attachment`
--

LOCK TABLES `activity_attachment` WRITE;
/*!40000 ALTER TABLE `activity_attachment` DISABLE KEYS */;
/*!40000 ALTER TABLE `activity_attachment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `activity_policy_violations`
--

DROP TABLE IF EXISTS `activity_policy_violations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `activity_policy_violations` (
  `serial_opa` int(11) DEFAULT NULL,
  `serial_act` int(11) DEFAULT NULL,
  `serial_emp` int(11) DEFAULT NULL,
  `start_date_apv` date NOT NULL,
  `end_date_apv` date NOT NULL,
  KEY `fk_relationship_146` (`serial_act`),
  KEY `fk_relationship_147` (`serial_opa`),
  KEY `fk_relationship_148` (`serial_emp`),
  CONSTRAINT `fk_relationship_146` FOREIGN KEY (`serial_act`) REFERENCES `activity` (`serial_act`),
  CONSTRAINT `fk_relationship_147` FOREIGN KEY (`serial_opa`) REFERENCES `opt_activity` (`serial_opa`),
  CONSTRAINT `fk_relationship_148` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `activity_policy_violations`
--

LOCK TABLES `activity_policy_violations` WRITE;
/*!40000 ALTER TABLE `activity_policy_violations` DISABLE KEYS */;
/*!40000 ALTER TABLE `activity_policy_violations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `activity_type`
--

DROP TABLE IF EXISTS `activity_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `activity_type` (
  `serial_att` int(11) NOT NULL AUTO_INCREMENT,
  `name_att` varchar(256) NOT NULL,
  `description_att` text NOT NULL,
  `status_att` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_att`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `activity_type`
--

LOCK TABLES `activity_type` WRITE;
/*!40000 ALTER TABLE `activity_type` DISABLE KEYS */;
/*!40000 ALTER TABLE `activity_type` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `admission`
--

DROP TABLE IF EXISTS `admission`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admission` (
  `serial_admission` int(11) NOT NULL AUTO_INCREMENT,
  `number_sons` int(11) NOT NULL DEFAULT '1',
  `request` int(11) DEFAULT NULL,
  PRIMARY KEY (`serial_admission`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='tabla que guarda el numero de hijos y la solicitud, la solicutud es auto incremental';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `admission`
--

LOCK TABLES `admission` WRITE;
/*!40000 ALTER TABLE `admission` DISABLE KEYS */;
/*!40000 ALTER TABLE `admission` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `allowed_pages_by_process`
--

DROP TABLE IF EXISTS `allowed_pages_by_process`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `allowed_pages_by_process` (
  `serial_prc` int(11) DEFAULT NULL,
  `url_dsc` varchar(1024) NOT NULL,
  KEY `fk_child_pages` (`serial_prc`),
  CONSTRAINT `fk_child_pages` FOREIGN KEY (`serial_prc`) REFERENCES `process` (`serial_prc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `allowed_pages_by_process`
--

LOCK TABLES `allowed_pages_by_process` WRITE;
/*!40000 ALTER TABLE `allowed_pages_by_process` DISABLE KEYS */;
INSERT INTO `allowed_pages_by_process` VALUES (3,'modules/academic_area/pNewArea'),(3,'rpc/remoteValidation/academic_area/checkNameAcademicArea.rpc'),(4,'modules/academic_area/fUpdateArea'),(4,'modules/academic_area/pUpdateArea'),(4,'rpc/remoteValidation/academic_area/checkNameAcademicArea.rpc'),(6,'modules/authority/pNewAuthority'),(7,'modules/authority/fUpdateAuthority'),(7,'modules/authority/pUpdateAuthority'),(9,'modules/authority_charges/pNewCharge'),(9,'rpc/remoteValidation/authority_charges/checkNameAuthorityCharge.rpc'),(10,'modules/authority_charges/fUpdateCharge'),(10,'modules/authority_charges/pUpdateCharge'),(10,'rpc/remoteValidation/authority_charges/checkNameAuthorityCharge.rpc'),(12,'modules/profile/pNewProfile'),(12,'rpc/remoteValidation/profile/checkProfileName.rpc'),(13,'rpc/loads/profile/loadProfiles.rpc'),(13,'modules/profile/fUpdateProfile'),(13,'modules/profile/pUpdateProfile'),(13,'rpc/loads/profile/checkProfileName.rpc'),(15,'modules/country/pNewCountry'),(15,'rpc/remoteValidation/country/checkCountryName.rpc'),(16,'modules/country/fUpdateCountry'),(16,'modules/country/pUpdateCountry'),(16,'rpc/remoteValidation/country/checkCountryName.rpc'),(18,'modules/state/pNewState'),(18,'rpc/remoteValidation/state/checkNameState.rpc'),(19,'rpc/loads/state/loadStates.rpc'),(19,'modules/state/fUpdateState'),(19,'modules/state/pUpdateState'),(19,'rpc/remoteValidation/state/checkNameState.rpc'),(21,'modules/section/pNewSection'),(21,'rpc/remoteValidation/section/checkSectionName.rpc'),(22,'rpc/loads/section/loadSections.rpc'),(22,'modules/section/fUpdateSection'),(22,'modules/section/pUpdateSection'),(22,'rpc/remoteValidation/section/checkSectionName.rpc'),(24,'modules/level/pNewLevel'),(24,'rpc/remoteValidation/level/checkNameLevel.rpc'),(25,'modules/level/fUpdateLevel'),(25,'modules/level/pUpdateLevel'),(25,'rpc/remoteValidation/level/checkNameLevel.rpc'),(27,'modules/specialty/pNewSpecialty'),(27,'rpc/remoteValidation/specialty/checkNameSpecialty.rpc'),(28,'modules/specialty/fUpdateSpecialty'),(28,'modules/specialty/pUpdateSpecialty'),(28,'rpc/remoteValidation/specialty/checkNameSpecialty.rpc'),(30,'modules/class_group/pNewClassGroup'),(30,'rpc/remoteValidation/class_group/checkNameClassGroup.rpc'),(31,'modules/class_group/fUpdateClassGroup'),(31,'modules/class_group/pUpdateClassGroup'),(31,'rpc/remoteValidation/class_group/checkNameClassGroup.rpc'),(34,'modules/group_hour/pNewGroupHour'),(34,'rpc/remoteValidation/group_hour/checkNameGroupHour.rpc'),(34,'rpc/loads/group_hour/loadHours.rpc'),(34,'rpc/loads/group_hour/loadCreditsDetails.rpc'),(35,'modules/group_hour/fUpdateGroupHour'),(35,'modules/group_hour/pUpdateGroupHour'),(35,'rpc/remoteValidation/group_hour/checkNameGroupHour.rpc'),(35,'rpc/loads/group_hour/loadHours.rpc'),(35,'rpc/remoteValidation/group_hour/deleteHour.rpc'),(35,'rpc/loads/group_hour/loadCreditsDetails.rpc'),(37,'modules/cat_period/pNewCatPeriod'),(37,'rpc/remoteValidation/cat_period/checkNameCatPeriod.rpc'),(38,'modules/cat_period/fUpdateCatPeriod'),(38,'modules/cat_period/pUpdateCatPeriod'),(38,'rpc/remoteValidation/cat_period/checkNameCatPeriod.rpc'),(41,'modules/year_setup/fStep0'),(41,'modules/year_setup/pStep0'),(41,'rpc/loads/year_setup/step0/loadCurrentSetup.rpc'),(41,'rpc/loads/year_setup/step0/loadPeriods.rpc'),(41,'rpc/loads/year_setup/step0/loadPeriodsGroup.rpc'),(41,'rpc/remoteValidation/year_setup/step0/checkNamePeriodGroup.rpc'),(41,'rpc/remoteValidation/year_setup/step0/checkMaximumGradeDate.rpc'),(41,'rpc/remoteValidation/year_setup/step0/deletePeriod.rpc'),(41,'rpc/loads/year_setup/step0/loadStatusOfPeriodsGroup.rpc'),(41,'rpc/loads/year_setup/step0/loadPeriodStatus.rpc'),(41,'modules/year_setup/fStep1'),(41,'modules/year_setup/pStep1'),(41,'rpc/loads/year_setup/step1/loadCurrentSetup.rpc'),(41,'modules/year_setup/fStep2'),(41,'modules/year_setup/pStep2'),(41,'rpc/loads/year_setup/step2/loadCurrentSetup.rpc'),(41,'rpc/loads/year_setup/step2/loadMissingSetup.rpc'),(41,'rpc/loads/year_setup/step2/loadSectionYear.rpc'),(41,'modules/year_setup/fStep3'),(41,'modules/year_setup/pStep3'),(41,'rpc/loads/year_setup/step3/loadCurrentSetup.rpc'),(41,'rpc/loads/year_setup/step3/loadMissingSetup.rpc'),(41,'rpc/loads/year_setup/step3/loadGroupHourInfo.rpc'),(41,'rpc/loads/year_setup/step3/loadLevelSectionYear.rpc'),(41,'rpc/loads/year_setup/step3/loadWorkingDays.rpc'),(41,'modules/year_setup/fStep4'),(41,'modules/year_setup/pStep4'),(41,'rpc/loads/year_setup/step4/loadCurrentSetup.rpc'),(41,'rpc/loads/year_setup/step4/loadMissingSetup.rpc'),(41,'rpc/remoteValidation/year_setup/step4/checkLevelsHaveSpecialization.rpc'),(41,'rpc/loads/year_setup/step4/loadSpecialtyLevelSectionList.rpc'),(41,'modules/year_setup/fStep5'),(41,'modules/year_setup/pStep5'),(41,'rpc/loads/year_setup/step5/loadCurrentSetup.rpc'),(41,'rpc/loads/year_setup/step5/loadMissingSetup.rpc'),(41,'rpc/loads/year_setup/step5/loadLevelsBySection.rpc'),(41,'rpc/loads/year_setup/step5/loadSpecialtyByLevel.rpc'),(41,'rpc/loads/year_setup/step5/loadClassGroupSpecialtyLevelSection.rpc'),(43,'modules/school_year/pNewYear'),(43,'rpc/remoteValidation/school_year/checkNameSchoolYear.rpc'),(44,'modules/school_year/fUpdateYear'),(44,'modules/school_year/pUpdateYear'),(44,'rpc/remoteValidation/school_year/checkNameSchoolYear.rpc'),(46,'modules/pre_registration/pNewPreRegistration'),(46,'rpc/loads/pre_registration/loadRequiredDocuments.rpc'),(46,'rpc/remoteValidation/pre_registration/upload_file.rpc'),(46,'rpc/loads/pre_registration/loadStatesByCountry.rpc'),(46,'rpc/loads/pre_registration/loadSectionsBySchoolYear.rpc'),(46,'rpc/loads/pre_registration/loadSpecialtiesBySection.rpc'),(46,'rpc/loads/pre_registration/loadLevelsBySchoolYear.rpc'),(46,'rpc/loads/pre_registration/loadGuardianEmployee.rpc'),(47,'modules/pre_registration/fUpdatePreRegistration'),(47,'modules/pre_registration/pUpdatePreRegistration'),(47,'rpc/loads/pre_registration/loadRequiredDocuments.rpc'),(47,'rpc/remoteValidation/pre_registration/upload_file.rpc'),(47,'rpc/loads/pre_registration/loadStatesByCountry.rpc'),(47,'rpc/loads/pre_registration/loadSectionsBySchoolYear.rpc'),(47,'rpc/loads/pre_registration/loadSpecialtiesBySection.rpc'),(47,'rpc/loads/pre_registration/loadLevelsBySchoolYear.rpc'),(47,'rpc/loads/pre_registration/loadGuardianEmployee.rpc'),(48,'rpc/loads/pre_registration/loadSectionsBySchoolYear.rpc'),(48,'rpc/loads/pre_registration/loadSpecialtiesBySection.rpc'),(48,'rpc/loads/pre_registration/loadLevelsBySchoolYear.rpc'),(48,'modules/pre_registration/documents/fPreRegisteredSelection'),(48,'modules/pre_registration/documents/pSavePreRegistration'),(48,'modules/pre_registration/documents/pSaveWebPreRegistration'),(48,'rpc/loads/pre_registration/loadPreRegistrationInfo.rpc'),(48,'rpc/loads/web/pre_registration/loadPreRegistrationInfo.rpc'),(48,'rpc/remoteValidation/pre_registration/upload_file.rpc'),(50,'modules/cat_subject/pNewCatSubject'),(50,'rpc/remoteValidation/cat_subject/checkCodeCatSubject.rpc'),(50,'rpc/loads/cat_subject/loadChildSubject.rpc'),(51,'rpc/loads/cat_subject/loadSubjects.rpc'),(51,'modules/cat_subject/fUpdateCatSubject'),(51,'modules/cat_subject/pUpdateCatSubject'),(51,'rpc/remoteValidation/cat_subject/checkCodeCatSubject.rpc'),(51,'rpc/loads/cat_subject/loadChildSubject.rpc'),(54,'modules/employee/teacher/pNewTeacher'),(54,'rpc/remoteValidation/employee/checkTeacherId.rpc'),(54,'rpc/loads/state/loadStates.rpc'),(54,'rpc/remoteValidation/employee/checkEmployeeGuardian.rpc'),(54,'rpc/loads/employee/teacher/loadPhoto.rpc'),(54,'rpc/remoteValidation/employee/checkTeacherEmployee.rpc'),(55,'rpc/autocompleters/loadTeachers.rpc'),(55,'modules/employee/teacher/fUpdateTeacher'),(55,'modules/employee/teacher/pUpdateTeacher'),(55,'rpc/remoteValidation/employee/checkTeacherId.rpc'),(55,'rpc/loads/state/loadStates.rpc'),(55,'rpc/remoteValidation/employee/checkGuardianId.rpc'),(55,'rpc/loads/employee/loadGuardianData.rpc'),(58,'modules/subject/fAssignSubject'),(58,'modules/subjectpAssignSubject'),(58,'rpc/loads/subject/loadCurrentSetupSubjects.rpc'),(58,'rpc/loads/subject/loadMissingSetupSubjects.rpc'),(58,'rpc/loads/subject/loadSpecialtyByYearBySection.rpc'),(58,'rpc/loads/subject/loadLevelsBySpecialtyByYearBySection.rpc'),(58,'rpc/loads/subject/loadLanguage.rpc'),(58,'rpc/loads/subject/loadSubjects.rpc'),(58,'modules/subject/fAssignSubjectsToCourse'),(58,'modules/subject/pAssignSubjectsToCourse'),(58,'rpc/loads/subject/loadCurrentSetupSubjectsToCourse.rpc'),(58,'rpc/loads/subject/loadMissingSetupSubjectsToCourse.rpc'),(58,'rpc/loads/subject/loadSpecialtiesBySection.rpc'),(58,'rpc/loads/subject/loadLevelsBySpecialty.rpc'),(58,'rpc/loads/subject/loadClassGroupsByLevel.rpc'),(58,'rpc/loads/subject/loadSubjectsByClassGroup.rpc'),(58,'modules/subject/fAssignWeightsToSubjects'),(58,'modules/subject/pAssignWeightsToSubjects'),(58,'rpc/loads/subject/loadCurrentSetupWeightsToSubjects.rpc'),(58,'rpc/loads/subject/loadMissingSetupWeightsToSubjects.rpc'),(58,'rpc/loads/subject/loadSpecialtiesBySection.rpc'),(58,'rpc/loads/subject/loadLevelsBySpecialty.rpc'),(58,'rpc/loads/subject/loadClassGroupsByLevel.rpc'),(58,'rpc/loads/subject/loadComposedSubjects.rpc'),(58,'rpc/loads/subject/loadPeriodsBySubjectTable.rpc'),(58,'modules/subject/fAssignTeachersToSubjectsByCourse'),(58,'modules/subject/pAssignTeachersToSubjectsByCourse'),(58,'rpc/loads/subject/loadCurrentSetupTeacherToCourse.rpc'),(58,'rpc/loads/subject/loadMissingSetupTeacherToSubject.rpc'),(58,'rpc/loads/subject/loadSpecialtiesBySection.rpc'),(58,'rpc/loads/subject/loadLevelsBySpecialty.rpc'),(58,'rpc/loads/subject/loadClassGroupsByLevel.rpc'),(58,'rpc/loads/subject/loadSubjectsWithTeachers.rpc'),(58,'modules/optional_subject/fOptionalSubjectLevelSpecialty'),(58,'modules/optional_subject/pOptionalSubjectLevelSpecialty'),(58,'rpc/loads/optional_subject/loadCurrentSetup.rpc'),(58,'rpc/loads/optional_subject/loadSubjectsByLenguaje.rpc'),(58,'rpc/loads/optional_subject/loadTeachersByAcademicArea.rpc'),(58,'rpc/loads/optional_subject/loadLevelsBySpecialty.rpc'),(58,'rpc/loads/optional_subject/loadSelectedLevelsBySpecialty.rpc'),(58,'rpc/loads/optional_subject/loadGradeMode.rpc'),(58,'rpc/loads/optional_subject/loadSelectedTeacher.rpc'),(58,'modules/optional_subject/fAssignGroupsToOptional'),(58,'modules/optional_subject/pAssignGroupsToOptional'),(58,'rpc/loads/optional_subject/assign_groups/loadSpecialtiesBySection.rpc'),(58,'rpc/loads/optional_subject/assign_groups/loadLevelsBySpecialty.rpc'),(58,'rpc/loads/optional_subject/assign_groups/loadAssignedGroups.rpc'),(58,'rpc/loads/optional_subject/assign_groups/addNewGroupForm.rpc'),(58,'rpc/remoteValidation/optional_subject/delete_group.rpc'),(60,'modules/teacher_hours_year/fAssignHoursToTeacher'),(60,'modules/teacher_hours_year/pAssignHoursToTeacher'),(60,'rpc/loads/teacher_hours_year/loadPeriods.rpc'),(60,'rpc/loads/teacher_hours_year/loadTeachersByAA.rpc'),(62,'modules/student/fAssignStudentsToCourses'),(62,'modules/student/fAssignStudentsToCourses'),(62,'rpc/loads/student/loadSpecialtiesBySectionByCourse.rpc'),(62,'rpc/loads/student/loadLevelsBySpecialtyByCourse.rpc'),(62,'rpc/loads/student/loadClassGroupsByLevel.rpc'),(62,'rpc/loads/student/loadStudentsByClassGroup.rpc'),(63,'modules/employee/teacher/pAssignTeacherToAcademicArea'),(63,'rpc/autocompleters/loadTeachers.rpc'),(63,'rpc/loads/employee/teacher/loadTable.rpc'),(64,'modules/employee/general/pNewEmployee'),(64,'rpc/remoteValidation/employee/checkEmployeeId.rpc'),(64,'rpc/loads/state/loadStates.rpc'),(64,'rpc/remoteValidation/employee/checkEmployeeGuardian.rpc'),(64,'rpc/loads/guardian/loadPhoto.rpc'),(64,'rpc/remoteValidation/employee/checkEmployeeTeacher.rpc'),(64,'rpc/remoteValidation/employee/checkEmployeeGuardian.rpc'),(65,'rpc/autocompleters/employee/general/loadEmployees.rpc'),(65,'modules/employee/general/fUpdateEmployee'),(65,'modules/employee/general/pUpdateEmployee'),(65,'rpc/remoteValidation/employee/checkEmployeeId.rpc'),(65,'rpc/loads/state/loadStates.rpc'),(67,'modules/classroom/pNewClassroom'),(67,'rpc/remoteValidation/classroom/checkNameClassroom.rpc'),(68,'modules/classroom/fUpdateClassroom'),(68,'modules/classroom/pUpdateClassroom'),(68,'rpc/remoteValidation/classroom/checkNameClassroom.rpc'),(69,'rpc/autocompleters/loadUsers.rpc'),(69,'modules/user_profile/fAssignProfilesToUser'),(69,'modules/user_profile/pAssignProfilesToUser'),(71,'rpc/loads/profile/loadProfiles.rpc'),(71,'modules/process/fUpdateProfileProcess'),(71,'modules/process/pUpdateProfileProcess'),(71,'rpc/remoteValidation/profile/checkProfileName.rpc'),(72,'modules/academic_area/pChangeAcademicAreaDirector'),(72,'rpc/loads/academic_area/loadAssignedTeachers.rpc'),(74,'modules/guardian/pNewGuardian'),(74,'rpc/remoteValidation/guardian/checkGuardianId.rpc'),(74,'rpc/remoteValidation/guardian/checkGuardianIsEmployee.rpc'),(74,'rpc/loads/guardian/loadPhoto.rpc'),(75,'rpc/autocompleters/guardian/loadGuardian.rpc'),(75,'modules/guardian/fUpdateGuardian'),(75,'modules/guardian/pUpdateGuardian'),(75,'rpc/remoteValidation/guardian/checkGuardianId.rpc'),(75,'rpc/remoteValidation/guardian/checkGuardianIsEmployee.rpc'),(75,'rpc/loads/guardian/loadPhoto.rpc'),(77,'rpc/loads/school_year/loadCurrentData.rpc'),(80,'modules/bus_driver/pNewBusDriver'),(80,'rpc/remoteValidation/bus_driver/checkBusDriverId.rpc'),(81,'rpc/autocompleters/bus_driver/loadBusDrivers.rpc'),(81,'modules/bus_driver/fUpdateBusDriver'),(81,'modules/bus_driver/pUpdateBusDriver'),(81,'rpc/remoteValidation/bus_driver/checkBusDriverId.rpc'),(83,'modules/bus/pNewBus'),(83,'rpc/remoteValidation/bus/checkBusCode.rpc'),(83,'rpc/remoteValidation/bus/checkBusPlate.rpc'),(84,'modules/bus/fUpdateBus'),(84,'modules/bus/pUpdateBus'),(84,'rpc/remoteValidation/bus/checkBusPlate.rpc'),(84,'rpc/remoteValidation/bus/checkBusCode.rpc'),(86,'modules/route/pNewRoute'),(86,'rpc/remoteValidation/route/checkCodeRoute.rpc'),(87,'modules/route/fUpdateRoute'),(87,'modules/route/pUpdateRoute'),(89,'modules/shift/pNewShift'),(89,'rpc/remoteValidation/shift/checkNameShift.rpc'),(90,'modules/shift/fUpdateShift'),(90,'modules/shift/pUpdateShift'),(90,'rpc/remoteValidation/shift/checkNameShift.rpc'),(92,'modules/activity_type/pNewActivityType'),(92,'rpc/remoteValidation/activity_type/checkNameActivityType.rpc'),(93,'modules/activity_type/fUpdateActivityType'),(93,'modules/activity_type/pUpdateActivityType'),(93,'rpc/remoteValidation/activity_type/checkNameActivityType.rpc'),(95,'modules/grade_criteria/pNewGradeCriteria'),(95,'rpc/remoteValidation/grade_criteria/checkNameGradeCriteria.rpc'),(96,'modules/grade_criteria/fUpdateGradeCriteria'),(96,'modules/grade_criteria/pUpdateGradeCriteria'),(96,'rpc/remoteValidation/grade_criteria/checkNameGradeCriteria.rpc'),(98,'modules/transportation_setup/pNewTransportationSetup'),(98,'rpc/loads/transportation_setup/loadConfiguratedTransportation.rpc'),(98,'rpc/loads/transportation_setup/loadRoutes.rpc'),(98,'rpc/loads/transportation_setup/checkIfConfigured.rpc'),(98,'rpc/loads/transportation_setup/loadShifts.rpc'),(98,'rpc/loads/transportation_setup/loadBusDrivers.rpc'),(98,'rpc/loads/transportation_setup/loadBuses.rpc'),(98,'rpc/remoteValidation/transportation_setup/checkBusHasUsers.rpc'),(98,'rpc/loads/transportation_setup/loadOldConfig.rpc'),(98,'rpc/loads/transportation_setup/loadOtherConfigForm.rpc'),(99,'rpc/autocompleters/user/loadUsersByDocument.rpc'),(99,'rpc/autocompleters/user/loadUsersByUserName.rpc'),(99,'modules/user/fDisableUser'),(99,'modules/user/pDisableUser'),(101,'modules/student_documents/pRegisterRequiredDocuments'),(101,'rpc/loads/student_documents/loadDocumentsByStudent.rpc'),(101,'rpc/remoteValidation/student_documents/upload_file.rpc'),(103,'modules/article/pNewArticle'),(103,'rpc/remoteValidation/article/checkCodeArticle.rpc'),(103,'rpc/remoteValidation/article/checkNameArticle.rpc'),(104,'rpc/autocompleters/article/loadArticles.rpc'),(104,'modules/article/fUpdateArticle'),(104,'modules/article/pUpdateArticle'),(104,'rpc/remoteValidation/article/checkCodeArticle.rpc'),(104,'rpc/remoteValidation/article/checkNameArticle.rpc'),(105,'modules/transportation_setup/fAssingUsersToBusShiftByYear'),(105,'modules/transportation_setup/pAssingUsersToBusShiftByYear'),(105,'modules/transportation_setup/pDeleteAssignedUsersToBusShift'),(105,'rpc/loads/transportation_setup/loadRouteData.rpc'),(105,'rpc/autocompleters/transportation_setup/loadEmployeesByDocument.rpc'),(105,'rpc/autocompleters/transportation_setup/loadStudentsByName.rpc'),(105,'rpc/loads/transportation_setup/checkIfExist.rpc'),(108,'modules/subject_year_grade_criteria/fAssignGradeCriteriasToSubjects'),(108,'modules/subject_year_grade_criteria/pAssignGradeCriteriasToSubjects'),(108,'rpc/loads/subject_year_grade_criteria/loadCurrentSetupCriterias.rpc'),(108,'rpc/loads/subject_year_grade_criteria/loadSpecialtiesBySectionByCourse.rpc'),(108,'rpc/loads/subject_year_grade_criteria/loadLevelsBySpecialtyByCourse.rpc'),(108,'rpc/loads/subject_year_grade_criteria/loadSubjectsByLevel.rpc'),(108,'rpc/loads/subject_year_grade_criteria/loadCriterias.rpc'),(108,'modules/subject_period_activity_type/fNewSubjectPeriodActivityTypeGeneral'),(108,'modules/subject_period_activity_type/pNewSubjectPeriodActivityTypeGeneral'),(108,'rpc/loads/subject_period_activity_type/loadLevelsBySection.rpc'),(108,'rpc/loads/subject_period_activity_type/loadSpecialtyByLevel.rpc'),(108,'rpc/loads/subject_period_activity_type/loadClassGroupSpecialtyLevelSection.rpc'),(108,'rpc/loads/subject_period_activity_type/loadSubjects.rpc'),(108,'rpc/loads/subject_period_activity_type/loadPeriodsBySubject.rpc'),(108,'rpc/loads/subject_period_activity_type/loadActivityBySubject.rpc'),(108,'modules/subject_period_activity_type/fNewSubjectPeriodActivityType'),(108,'modules/subject_period_activity_type/pNewSubjectPeriodActivityType'),(108,'rpc/loads/subject_period_activity_type/loadAllSubjectsDialog.rpc'),(108,'rpc/loads/subject_period_activity_type/loadLevelsBySection.rpc'),(108,'rpc/loads/subject_period_activity_type/loadPeriodsByLevel.rpc'),(108,'rpc/loads/subject_period_activity_type/loadActivity.rpc'),(108,'modules/subject_year_activity_criteria_period/fNewSubjectYearActivityCriteriaPeriod'),(108,'modules/subject_year_activity_criteria_period/pNewSubjectYearActivityCriteriaPeriod'),(108,'rpc/loads/subject_year_activity_criteria_period/loadSetupDialog.rpc'),(108,'rpc/loads/subject_period_activity_type/loadLevelsBySection.rpc'),(108,'rpc/loads/subject_period_activity_type/loadSpecialtyByLevel.rpc'),(108,'rpc/loads/subject_period_activity_type/loadClassGroupSpecialtyLevelSection.rpc'),(108,'rpc/loads/subject_period_activity_type/loadSubjects.rpc'),(108,'rpc/loads/subject_year_activity_criteria_period/loadPeriodsBySubject.rpc'),(108,'rpc/loads/subject_year_activity_criteria_period/loadActivityBySubject.rpc'),(108,'rpc/loads/subject_year_activity_criteria_period/checkGeneralCriteria.rpc'),(108,'rpc/loads/subject_year_activity_criteria_period/loadCriteriaBySubject.rpc'),(110,'modules/opt_subject_year_grade_criteria/fAssignGradeCriteriasToOptionalSubjects'),(110,'modules/opt_subject_year_grade_criteria/pAssignGradeCriteriasToOptionalSubjects'),(110,'rpc/loads/opt_subject_year_grade_criteria/loadCurrentSetupCriterias.rpc'),(110,'rpc/loads/opt_subject_year_grade_criteria/loadOptionalSubjects.rpc'),(110,'rpc/loads/opt_subject_year_grade_criteria/loadCriterias.rpc'),(110,'modules/opt_subject_period_activity_type/fNewOptSubjectPeriodActivityType'),(110,'modules/opt_subject_period_activity_type/pNewOptSubjectPeriodActivityType'),(110,'rpc/loads/opt_subject_period_activity_type/loadOptSubjectByLanguage.rpc'),(110,'rpc/loads/opt_subject_period_activity_type/loadPeriodsByOptSubject.rpc'),(110,'rpc/loads/opt_subject_period_activity_type/loadActivityByPeriod.rpc'),(110,'modules/opt_subject_year_activity_criteria_period/fNewOptSubjectYearActivityCriteriaPeriod'),(110,'modules/opt_subject_year_activity_criteria_period/pNewOptSubjectYearActivityCriteriaPeriod'),(110,'rpc/loads/opt_subject_year_activity_criteria_period/loadOptSubjectByLanguage.rpc'),(110,'rpc/loads/opt_subject_period_activity_type/loadPeriodsByOptSubject.rpc'),(110,'rpc/loads/opt_subject_year_activity_criteria_period/loadActivityByPeriod.rpc'),(110,'rpc/loads/opt_subject_year_activity_criteria_period/checkGeneralCriteria.rpc'),(110,'rpc/loads/opt_subject_year_activity_criteria_period/loadCriteriaBySubject.rpc'),(112,'modules/payment_concept/pNewPaymentConcept'),(112,'rpc/remoteValidation/payment_concept/checkNamePaymentConcept.rpc'),(113,'modules/payment_concept/fUpdatePaymentConcept'),(113,'modules/payment_concept/pUpdatePaymentConcept'),(113,'rpc/remoteValidation/payment_concept/checkNamePaymentConcept.rpc'),(115,'modules/tax/pNewTax'),(115,'rpc/remoteValidation/tax/checkNameTax.rpc'),(116,'modules/tax/fUpdateTax'),(116,'modules/tax/pUpdateTax'),(116,'rpc/remoteValidation/tax/checkNameTax.rpc'),(118,'modules/year_level_specialty_payment_concept/fYearLevelSpecialtyPaymentConcept'),(118,'modules/year_level_specialty_payment_concept/pYearLevelSpecialtyPaymentConcept'),(118,'rpc/loads/year_level_specialty_payment_concept/loadPreConfiguration.rpc'),(118,'rpc/loads/year_level_specialty_payment_concept/loadCurrentSetup.rpc'),(118,'rpc/loads/year_level_specialty_payment_concept/loadPaymentConcepts.rpc'),(118,'rpc/loads/year_level_specialty_payment_concept/loadArticles.rpc'),(118,'rpc/loads/year_level_specialty_payment_concept/loadTaxes.rpc'),(118,'rpc/loads/year_level_specialty_payment_concept/loadLevelsBySpecialtySection.rpc'),(118,'rpc/loads/year_level_specialty_payment_concept/loadSpecialtiesBySection.rpc'),(118,'rpc/remoteValidation/year_level_specialty_payment_concept/checkArticleByPaymentConcept.rpc.php'),(118,'rpc/remoteValidation/year_level_specialty_payment_concept/checkPaymentConceptByLevelSectionYear.rpc'),(118,'rpc/loads/year_level_specialty_payment_concept/loadEditionData.rpc'),(126,'modules/student_criteria_grade/fGradeActivityByCourse'),(126,'rpc/loads/student_criteria_grade/loadSectionsBySchoolYear.rpc'),(126,'rpc/loads/student_criteria_grade/loadSpecialtiesBySection.rpc'),(126,'rpc/loads/student_criteria_grade/loadLevelsBySpecialty.rpc'),(126,'rpc/loads/student_criteria_grade/loadClassGroupsByLevel.rpc'),(126,'rpc/loads/student_criteria_grade/loadPeriodsByLevel.rpc'),(126,'rpc/loads/student_criteria_grade/loadSubjectsByCourseAndPeriod.rpc'),(126,'rpc/loads/student_criteria_grade/loadActivitiesTable.rpc'),(126,'rpc/loads/student_criteria_grade/loadStudentsToGrade.rpc'),(127,'modules/opt_student_criteria_grade/pOptionalSubjectGradeActivityByCourse'),(127,'rpc/loads/opt_student_criteria_grade/loadSubjectsByYearAndLanguage.rpc'),(127,'rpc/loads/opt_student_criteria_grade/loadPeriodsBySubject.rpc'),(127,'rpc/loads/opt_student_criteria_grade/loadActivitiesTable.rpc'),(127,'rpc/loads/opt_student_criteria_grade/loadStudentsToGrade.rpc'),(131,'modules/student_subject_activity/fViewStudentActivities'),(131,'modules/student_subject_activity/pViewStudentActivities'),(131,'rpc/loads/student_subject_activity/loadSubjectsByStudent.rpc'),(131,'rpc/loads/student_subject_activity/loadActivities.rpc'),(131,'rpc/loads/student_subject_activity/loadDescription.rpc'),(131,'rpc/remoteValidation/activity/upload_file.rpc'),(132,'modules/student_opt_subject_activity/fViewStudentActivities'),(132,'modules/student_opt_subject_activity/pViewStudentActivities'),(132,'rpc/loads/student_opt_subject_activity/loadSubjectsByStudent.rpc'),(132,'rpc/loads/student_opt_subject_activity/loadActivities.rpc'),(132,'rpc/remoteValidation/activity/upload_file.rpc'),(133,'modules/student_optional_subject/fAssignStudentsToOptionalSubject'),(133,'modules/student_optional_subject/fAssignStudentsToOptionalSubjectByPeriod'),(133,'modules/student_optional_subject/pAssignStudentsToOptionalSubject'),(133,'modules/student_optional_subject/pAssignStudentsToOptionalSubjectByPeriod'),(133,'rpc/loads/student_optional_subject/loadSpecialtiesBySectionByOptionalSubject.rpc'),(133,'rpc/loads/student_optional_subject/loadLevelsBySpecialtyByOptionalSubject.rpc'),(133,'rpc/loads/student_optional_subject/loadClassGroupsByLevelByOptionalSubject.rpc'),(133,'rpc/loads/student_optional_subject/loadOptionalGroupsByLevel.rpc'),(133,'rpc/loads/student_optional_subject/loadStudentsByOptionalSubject.rpc'),(133,'rpc/loads/student_optional_subject/loadOptionalSubjectsByStudent.rpc'),(133,'rpc/remoteValidation/student_optional_subject/checkOptionalSubjectByPeriod.rpc'),(133,'rpc/loads/student_optional_subject/loadStudents.rpc'),(133,'rpc/remoteValidation/student_optional_subject/checkOptionalSubject.rpc'),(135,'modules/syllabus_files/pAssignSyllabusFiles'),(135,'rpc/loads/syllabus_files/loadOptionalSubjects.rpc'),(135,'rpc/loads/syllabus_files/loadSectionsBySchoolYear.rpc'),(135,'rpc/loads/syllabus_files/loadSpecialtiesBySection.rpc'),(135,'rpc/loads/syllabus_files/loadLevelsBySpecialty.rpc'),(135,'rpc/loads/syllabus_files/loadClassGroupsByLevel.rpc'),(135,'rpc/loads/syllabus_files/loadSubjectsByCourse.rpc'),(135,'rpc/loads/syllabus_files/loadExistingAttachments.rpc'),(135,'rpc/loads/syllabus_files/loadAttachmentsDetails.rpc'),(135,'rpc/remoteValidation/syllabus_files/delete_attachment.rpc'),(135,'rpc/remoteValidation/syllabus_files/upload_file.rpc'),(136,'modules/syllabus_files_change_log/pChangeSyllabusFiles'),(136,'rpc/loads/syllabus_files_change_log/loadOptionalSubjects.rpc'),(136,'rpc/loads/syllabus_files_change_log/loadSectionsBySchoolYear.rpc'),(136,'rpc/loads/syllabus_files_change_log/loadSpecialtiesBySection.rpc'),(136,'rpc/loads/syllabus_files_change_log/loadLevelsBySpecialty.rpc'),(136,'rpc/loads/syllabus_files_change_log/loadClassGroupsByLevel.rpc'),(136,'rpc/loads/syllabus_files_change_log/loadSubjectsByCourse.rpc'),(136,'rpc/loads/syllabus_files/loadExistingAttachments.rpc'),(136,'rpc/loads/syllabus_files/loadAttachmentsDetails.rpc'),(136,'rpc/remoteValidation/syllabus_files/delete_attachment.rpc'),(136,'rpc/remoteValidation/syllabus_files/upload_file.rpc'),(137,'modules/grade_change_log/pGradeChangeLog'),(137,'rpc/loads/grade_change_log/loadSectionsBySchoolYear.rpc'),(137,'rpc/loads/grade_change_log/loadSpecialtiesBySection.rpc'),(137,'rpc/loads/grade_change_log/loadLevelsBySpecialty.rpc'),(137,'rpc/loads/grade_change_log/loadClassGroupsByLevel.rpc'),(137,'rpc/loads/grade_change_log/loadPeriodsByLevel.rpc'),(137,'rpc/loads/grade_change_log/loadSubjectsByCourseAndPeriod.rpc'),(137,'rpc/loads/grade_change_log/loadActivitiesTable.rpc'),(137,'rpc/loads/grade_change_log/loadStudentsToGrade.rpc'),(138,'modules/opt_grade_change_log/pOptGradeChangeLog'),(138,'rpc/loads/opt_grade_change_log/loadSubjectsByYearAndLanguage.rpc'),(138,'rpc/loads/opt_grade_change_log/loadPeriodsBySubject.rpc'),(138,'rpc/loads/opt_grade_change_log/loadActivitiesTable.rpc'),(138,'rpc/loads/opt_grade_change_log/loadStudentsToGrade.rpc'),(139,'rpc/loads/student_details/syllabus_files/loadSyllabusFiles.rpc'),(139,'rpc/loads/student_details/syllabus_files/loadSubjectsTable.rpc'),(139,'rpc/loads/student_details/syllabus_files/loadStudentsBySchoolYear.rpc'),(139,'rpc/remoteValidation/student_details/set_session.rpc.php'),(140,'modules/activity/pUploadFileStudentCalendar'),(140,'modules/activity/pNewGeneralActivity'),(140,'rpc/loads/activity/loadNewActivityDialogForStudents.rpc'),(140,'rpc/loads/activity/loadStudentGeneralActivityNoEditableDialog.rpc'),(140,'rpc/loads/activity/loadStudentGeneralActivityEditableDialogAll.rpc'),(140,'rpc/loads/activity/loadStudentGeneralActivityEditableDialog.rpc'),(140,'rpc/loads/activity/loadStudentGeneralActivityNoEditableDialog.rpc'),(140,'rpc/loads/activity/loadStudentActivityNoEditableDialog.rpc'),(140,'rpc/loads/activity/loadActivityToUploadFileDialog.rpc'),(140,'rpc/loads/activity/loadSubjectList.rpc'),(140,'rpc/loads/activity/loadActivitiesForCalendarByStudent.rpc'),(140,'rpc/loads/activity/loadPersonalActivitiesForCalendarByStudent.rpc'),(140,'rpc/remoteValidation/message/delete_attachment.rpc'),(140,'rpc/remoteValidation/activity/updateGeneralActivityDate.rpc'),(141,'rpc/loads/activity/loadStudentGeneralActivityNoEditableDialog.rpc'),(141,'rpc/loads/activity/loadActivityNoEditableDialog.rpc'),(141,'rpc/loads/activity/loadSubjectsByStudents.rpc'),(141,'rpc/loads/activity/loadStudentInfo.rpc'),(141,'rpc/loads/activity/loadActivitiesForCalendarByStudent.rpc'),(141,'rpc/loads/activity/loadGeneralActivitiesForCalendarByStudent.rpc'),(144,'modules/discipline/pDisciplineGeneralGrade'),(144,'rpc/loads/discipline/loadSectionsByYear.rpc'),(144,'rpc/loads/discipline/loadPeriodsByYear.rpc'),(144,'rpc/loads/discipline/loadSpecialtiesBySection.rpc'),(144,'rpc/loads/discipline/loadLevelsBySpecialty.rpc'),(144,'rpc/loads/discipline/loadClassGroupsByLevel.rpc'),(144,'rpc/loads/discipline/loadStudents.rpc'),(144,'rpc/loads/discipline/loadHistory.rpc'),(145,'modules/student_criteria_grade/pGradeDisciplineByCourse'),(145,'modules/student_criteria_grade/pGradeDisciplineByCourseForOptional'),(145,'rpc/loads/student_criteria_grade/discipline/loadOptSectionsBySchoolYear.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadOptSpecialtiesBySection.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadOptLevelsBySpecialty.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadOptionalSubjectsByLevel.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadPeriodsByOptSubject.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadStudentsByOptSubject.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadSectionsBySchoolYear.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadSpecialtiesBySection.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadLevelsBySpecialty.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadClassGroupsByLevel.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadPeriodsByLevel.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadSubjectsByCourseAndPeriod.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadStudentsToGradeDiscipline.rpc'),(146,'modules/student_criteria_grade/pGradeDisciplineByCourse'),(146,'modules/student_criteria_grade/pGradeDisciplineByCourseForOptional'),(146,'rpc/loads/student_criteria_grade/discipline/loadOptSectionsBySchoolYear.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadOptSpecialtiesBySection.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadOptLevelsBySpecialty.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadOptionalSubjectsByLevel.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadPeriodsByOptSubject.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadStudentsByOptSubject.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadSectionsBySchoolYear.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadSpecialtiesBySection.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadLevelsBySpecialty.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadClassGroupsByLevel.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadPeriodsByLevel.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadSubjectsByCourseAndPeriod.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadStudentsToGradeDiscipline.rpc'),(148,'modules/message/fOutbox'),(148,'modules/message/fMessageSend'),(148,'modules/message/fMessagesDeleted'),(148,'modules/message/fMessagesSaved'),(148,'modules/message/fReplyMessage'),(148,'modules/message/fSendMessage'),(148,'modules/message/fViewMessage'),(148,'modules/message/fViewMessageInbox'),(148,'modules/message/fViewMessageOutbox'),(148,'modules/message/pDeleteMessage'),(148,'modules/message/pDeletePermanentlyMessage'),(148,'modules/message/pSaveMessage'),(148,'modules/message/pReplyMessage'),(148,'modules/message/pSendMessage'),(148,'rpc/remoteValidation/message/upload_file.rpc'),(148,'rpc/remoteValidation/message/delete_attachment.rpc'),(148,'rpc/loads/message/loadRecipients.rpc'),(148,'rpc/remoteValidation/message/upload_file.rpc'),(148,'rpc/loads/message/loadTeachers.rpc'),(148,'rpc/loads/message/loadStudents.rpc'),(148,'rpc/loads/message/loadTeachersByStudent.rpc'),(148,'rpc/loads/message/loadClassmateTypes.rpc'),(148,'rpc/loads/message/loadTeachersByArea.rpc'),(148,'rpc/loads/message/loadOptionalSubjects.rpc'),(148,'rpc/loads/message/loadSectionsBySchoolYear.rpc'),(148,'rpc/loads/message/loadSpecialtiesBySection.rpc'),(148,'pc/loads/message/loadLevelsBySpecialty.rpc'),(148,'rpc/loads/message/loadClassGroupsByLevel.rpc'),(148,'rpc/remoteValidation/message/valid_file.rpc.php'),(152,'modules/reports/employee/teacher/pExcelTeachersByArea'),(152,'modules/reports/employee/teacher/pPDFTeachersByArea'),(152,'rpc/loads/reports/employee/teacher/loadTeacherByArea.rpc'),(153,'modules/reports/student/pExcelStudentsByCourse'),(153,'modules/reports/student/pExcelStudentsByOptSubject'),(153,'modules/reports/student/pPDFStudentsByCourse'),(153,'modules/reports/student/pPDFStudentsByOptSubject'),(153,'rpc/loads/reports/student/loadStudentsByCourse.rpc'),(153,'rpc/loads/reports/student/loadStudentsByOptSubject.rpc'),(153,'rpc/loads/reports/student/loadSchoolYear.rpc'),(153,'rpc/loads/reports/student/loadOptSubject.rpc'),(153,'rpc/loads/reports/student/loadSectionYear.rpc'),(153,'rpc/loads/reports/student/loadSpecialtiesYear.rpc'),(153,'rpc/loads/reports/student/loadLevelsYear.rpc'),(153,'rpc/loads/reports/student/loadClassGroupYear.rpc'),(155,'modules/message/pMessagesBetweenProfiles'),(155,'rpc/loads/message/loadProfiles.rpc'),(157,'modules/student_year_debts/fChooseMonthForPayingDebt'),(157,'modules/student_year_debts/fPayDebts'),(157,'modules/student_year_debts/pPayDebts'),(157,'rpc/autocompleters/student_year_debts/loadStudents.rpc'),(157,'rpc/loads/student_year_debts/loadInvoiceData.rpc'),(157,'rpc/loads/student_year_debts/loadLegalGuardianInfo.rpc'),(157,'rpc/loads/student_year_debts/loadGuardians.rpc'),(157,'rpc/loads/student_year_debts/loadInvoiceInformation.rpc'),(157,'rpc/loads/student_year_debts/loadPreview.rpc'),(157,'rpc/loads/student_year_debts/addPaymentMethod.rpc'),(157,'rpc/loads/student_year_debts/loadGuardianInfo.rpc'),(159,'modules/reports/user/pExcelGeneralUserAccess'),(159,'modules/reports/user/pExcelSpecificUserAccess'),(159,'modules/reports/user/pPDFGeneralUserAccess'),(159,'modules/reports/user/pPDFSpecificUserAccess'),(159,'rpc/loads/reports/user/loadUserAccessByProfile.rpc'),(159,'rpc/loads/reports/user/loadUserDetails.rpc'),(161,'modules/message/pSendCommunication'),(161,'rpc/loads/message/loadRecipientsForCommunications.rpc'),(161,'rpc/remoteValidation/message/upload_file.rpc'),(161,'rpc/loads/message/loadTypes.rpc'),(161,'rpc/loads/message/loadTeachers.rpc'),(161,'rpc/loads/message/loadStudents.rpc'),(161,'rpc/loads/message/loadTeachersByArea.rpc'),(161,'rpc/loads/message/loadSectionsBySchoolYear.rpc'),(161,'rpc/loads/message/loadSpecialtiesBySection.rpc'),(161,'rpc/loads/message/loadLevelsBySpecialty.rpc'),(161,'rpc/loads/message/loadClassGroupsByLevel.rpc'),(161,'rpc/remoteValidation/message/delete_attachment.rpc'),(163,'modules/change_reason/pNewChangeReason'),(163,'rpc/remoteValidation/change_reason/checkReasonName.rpc'),(164,'modules/change_reason/fUpdateChangeReason'),(164,'modules/change_reason/pUpdateChangeReason'),(164,'rpc/remoteValidation/change_reason/checkReasonName.rpc'),(166,'modules/course_director/pNewCourseDirector'),(166,'rpc/loads/course_director/loadSectionYear.rpc'),(166,'rpc/loads/course_director/loadSpecialtiesYear.rpc'),(166,'rpc/loads/course_director/loadLevelsYear.rpc'),(166,'rpc/loads/course_director/loadClassGroupYear.rpc'),(166,'rpc/loads/course_director/loadAreas.rpc'),(166,'rpc/loads/course_director/loadTeacherArea.rpc'),(166,'rpc/loads/course_director/loadTeacherStatus.rpc'),(168,'modules/qualitative_equivalence/pNewQualitativeEquivalence'),(168,'rpc/loads/qualitative_equivalence/loadConfiguratedQualitativeEquivalences.rpc'),(168,'rpc/loads/qualitative_equivalence/loadOtherQualitativeEqForm.rpc'),(168,'rpc/loads/qualitative_equivalence/checkOldQualitativeEquivalenceByYear.rpc'),(169,'modules/year_resit_exam_ranges/pNewYearResitExamRanges'),(169,'rpc/loads/year_resit_exam_ranges/loadConfiguratedResitExamRanges.rpc'),(169,'rpc/loads/year_resit_exam_ranges/checkYearResitExamRangesContainer.rpc'),(169,'rpc/loads/year_resit_exam_ranges/loadYearResitExamRangesForm.rpc'),(171,'modules/year_subject_classroom/pAssignClassroomsToSubjects'),(171,'rpc/loads/year_subject_classroom/loadSectionsByYear.rpc'),(171,'rpc/loads/year_subject_classroom/loadLevelsBySection.rpc'),(171,'rpc/loads/year_subject_classroom/loadSpecialtyByLevel.rpc'),(171,'rpc/loads/year_subject_classroom/loadClassGroupsBySpecialty.rpc'),(171,'rpc/loads/year_subject_classroom/loadSubjectsByCourse.rpc'),(171,'rpc/loads/year_subject_classroom/loadOptionalSubjectsByYear.rpc'),(173,'modules/student/fUpdateStudentInfo'),(173,'modules/student/pUpdateStudentInfo'),(173,'rpc/autocompleters/student/loadStudents.rpc'),(173,'rpc/remoteValidation/student/checkId.rpc'),(173,'rpc/loads/student/loadStatesByCountry.rpc'),(174,'modules/student_guardian/pAssignLegalGuardian'),(174,'modules/student_guardian/pAssignNewGuardian'),(174,'modules/student_guardian/pRemoveGuardian'),(174,'rpc/autocompleters/student_guardian/loadStudents.rpc'),(174,'rpc/loads/student_guardian/loadStudentInfo.rpc'),(174,'rpc/autocompleters/student_guardian/loadGuardians.rpc'),(177,'modules/item_category/pNewItemCategory'),(178,'modules/item_category/fUpdateItemCategory'),(178,'modules/item_category/pUpdateItemCategory'),(178,'rpc/remoteValidation/item_category/checkNameItemCategory.rpc'),(180,'modules/provider/pNewProvider'),(181,'modules/provider/fUpdateProvider'),(181,'modules/provider/pUpdateProvider'),(181,'rpc/remoteValidation/provider/checkNameProvider.rpc'),(183,'modules/year_grade_subject/fAssignSubjectToYearForGrade'),(183,'modules/year_grade_subject/pAssignSubjectToYearForGrade'),(184,'modules/grade_subject_score/fAssignGradeSubjectToStudents'),(184,'modules/grade_subject_score/pAssignGradeSubjectToStudents'),(184,'rpc/loads/grade_subject_score/assignGradeSubjectsToStudents/loadSpecialtyByYearBySection.rpc'),(184,'rpc/loads/grade_subject_score/assignGradeSubjectsToStudents/loadLevelsBySpecialtyByYearBySection.rpc'),(184,'rpc/loads/grade_subject_score/assignGradeSubjectsToStudents/loadClassGroupsByLevel.rpc'),(184,'rpc/loads/grade_subject_score/assignGradeSubjectsToStudents/loadStudentsByClassGroup.rpc'),(184,'rpc/loads/grade_subject_score/assignGradeSubjectsToStudents/loadStudentCurrentConfig.rpc'),(186,'modules/year_special_grade_setup/fAssignGradesToStudents'),(186,'modules/year_special_grade_setup/fNewStudentYearSpecialGrade'),(186,'modules/year_special_grade_setup/fNewYearSpecialGrade'),(186,'modules/year_special_grade_setup/pAssignGradesToStudents'),(186,'modules/year_special_grade_setup/pNewStudentYearSpecialGrade'),(186,'modules/year_special_grade_setup/pNewYearSpecialGrade'),(186,'rpc/loads/year_special_grade_setup/loadConfiguratedYearSpecialGrade.rpc'),(186,'rpc/loads/year_special_grade_setup/loadYearSpecialGradeForm.rpc'),(186,'rpc/remoteValidation/year_special_grade_setup/checkStudentYearSpecialGrade.rpc'),(186,'rpc/loads/year_special_grade_setup/loadConfiguratedStudentYearSpecialGrade.rpc'),(186,'rpc/loads/year_special_grade_setup/loadSpecialtiesBySection.rpc'),(186,'rpc/loads/year_special_grade_setup/loadLevelsBySpecialtyByYearBySection.rpc'),(186,'rpc/loads/year_special_grade_setup/checkStudentsByLevel.rpc'),(186,'rpc/loads/year_special_grade_setup/loadClassGroupsByLevel.rpc'),(186,'rpc/loads/year_special_grade_setup/loadStudentsTable.rpc'),(186,'rpc/loads/year_special_grade_setup/loadSpecialGradesDialog.rpc'),(188,'modules/use_destination/pNewUseDestination'),(189,'modules/use_destination/fUpdateUseDestination'),(189,'modules/use_destination/pUpdateUseDestination'),(189,'rpc/remoteValidation/use_destination/checkNameUseDestination.rpc'),(191,'modules/financial_institution/pNewFinancialInstitution'),(191,'rpc/remoteValidation/financial_institution/checkFinancialInstitutionName.rpc'),(192,'modules/financial_institution/fUpdateFinancialInstitution'),(192,'modules/financial_institution/pUpdateFinancialInstitution'),(192,'rpc/remoteValidation/financial_institution/checkFinancialInstitutionName.rpc'),(194,'modules/credit_card/pNewCreditCard'),(194,'rpc/remoteValidation/credit_card/checkCreditCard.rpc'),(195,'modules/credit_card/fUpdateCreditCard'),(195,'modules/credit_card/pUpdateCreditCard'),(195,'rpc/remoteValidation/credit_card/checkCreditCard.rpc'),(197,'modules/maintenance_item/pNewMaintenanceItem'),(197,'rpc/remoteValidation/maintenance_item/checkNameAndBrandMaintenanceItem.rpc'),(198,'modules/maintenance_item/fUpdateMaintenanceItem'),(198,'modules/maintenance_item/pUpdateMaintenanceItem'),(198,'rpc/remoteValidation/maintenance_item/checkNameMaintenanceItem.rpc'),(201,'modules/ministry_subject/pNewMinistrySubject'),(201,'rpc/remoteValidation/ministry_subject/checkNameMinistrySubject.rpc'),(202,'modules/ministry_subject/fUpdateMinistrySubject'),(202,'modules/ministry_subject/pUpdateMinistrySubject'),(202,'rpc/remoteValidation/ministry_subject/checkNameMinistrySubject.rpc'),(204,'modules/subject_ministry_equivalence/fNewSubjectMinistryEquivalence'),(204,'rpc/loads/subject_ministry_equivalence/loadCurrentSetupEquivalence.rpc'),(204,'rpc/loads/subject_ministry_equivalence/loadRemainingSetupEquivalence.rpc'),(204,'rpc/loads/subject_ministry_equivalence/loadSubjectContainer.rpc'),(204,'rpc/loads/subject_ministry_equivalence/loadMinistrySubjectContainer.rpc'),(204,'pc/loads/subject_ministry_equivalence/loadTeacherContainer.rpc'),(204,'rpc/loads/subject_ministry_equivalence/loadTeachersByArea.rpc'),(204,'rpc/loads/discipline/loadSectionsByYear.rpc'),(204,'rpc/loads/discipline/loadSpecialtiesBySection.rpc'),(204,'rpc/loads/discipline/loadLevelsBySpecialty.rpc'),(204,'rpc/loads/subject_ministry_equivalence/loadSubjects.rpc'),(206,'modules/incident/pNewIncident'),(206,'rpc/autocompleters/incident/loadEmployees.rpc'),(206,'rpc/autocompleters/incident/loadStudents.rpc'),(206,'rpc/autocompleters/incident/loadGuardian.rpc'),(206,'rpc/loads/incident/loadUserData.rpc'),(206,'rpc/loads/incident/loadHistory.rpc'),(208,'modules/visits_medical_center/pNewVisit'),(208,'rpc/autocompleters/visits_medical_center/loadUsers.rpc'),(208,'rpc/autocompleters/visits_medical_center/loadGuests.rpc'),(208,'rpc/remoteValidation/visits_medical_center/check_medical_file.rpc'),(208,'rpc/loads/visits_medical_center/loadNewVisit.rpc'),(208,'rpc/loads/visits_medical_center/loadMedicalFile.rpc'),(208,'rpc/remoteValidation/visits_medical_center/upload_file.rpc'),(209,'modules/activity/pNewActivity'),(209,'modules/activity/pUpdateActivity'),(209,'rpc/loads/activity/loadNewActivityDialog.rpc'),(209,'rpc/loads/activity/loadActivityToEditDialog.rpc'),(209,'rpc/loads/activity/loadActivityNoEditableDialog.rpc'),(209,'rpc/loads/activity/loadActivitiesForCalendar.rpc'),(209,'rpc/loads/activity/loadAssignedSubjectsToTeacher.rpc'),(209,'rpc/remoteValidation/activity/updateActivityDate.rpc'),(209,'rpc/loads/activity/loadSectionsBySchoolYear.rpc'),(209,'rpc/loads/activity/loadSpecialtiesBySection.rpc'),(209,'rpc/loads/activity/loadLevelsBySpecialty.rpc'),(209,'rpc/loads/activity/loadClassGroupsByLevel.rpc'),(209,'rpc/loads/activity/loadPeriodsByLevel.rpc'),(210,'modules/opt_activity/pNewOptionalActivity'),(210,'modules/opt_activity/pUpdateOptionalActivity'),(210,'rpc/loads/opt_activity/loadActivitiesForCalendar.rpc'),(210,'rpc/loads/opt_activity/loadNewActivityDialog.rpc'),(210,'rpc/loads/opt_activity/loadActivityToEditDialog.rpc'),(210,'rpc/loads/opt_activity/loadActivityNoEditableDialog.rpc'),(210,'rpc/remoteValidation/opt_activity/updateActivityDate.rpc'),(210,'rpc/loads/opt_activity/loadSubjectsByYearAndLanguage.rpc'),(210,'rpc/loads/opt_activity/loadPeriodsBySubject.rpc'),(212,'modules/level_section_year/fAssignDisciplineTypeToLevel'),(212,'modules/level_section_year/pAssignDisciplineTypeToLevel'),(212,'rpc/loads/level_section_year/loadCurrentDisciplineSetup.rpc'),(212,'rpc/loads/level_section_year/loadMissingDisciplineSetup.rpc'),(212,'rpc/loads/level_section_year/loadLevelsBySection.rpc'),(212,'rpc/loads/level_section_year/loadCurrentConfiguration.rpc'),(213,'modules/general_activity/pNewGeneralActivity'),(213,'modules/general_activity/pUpdateGeneralActivity'),(213,'rpc/loads/general_activity/loadActivityNoEditableDialog.rpc'),(213,'rpc/loads/general_activity/loadActivitiesForCalendar.rpc'),(213,'rpc/loads/general_activity/loadActivityToEditDialog.rpc'),(213,'rpc/remoteValidation/general_activity/remove_participant.rpc'),(213,'rpc/remoteValidation/general_activity/updateActivityDate.rpc'),(213,'rpc/loads/general_activity/loadNewActivityDialog.rpc'),(213,'rpc/remoteValidation/general_activity/upload_file.rpc'),(213,'rpc/loads/general_activity/loadNewParticipant.rpc'),(213,'rpc/loads/general_activity/loadContentForAttendee.rpc'),(213,'rpc/loads/general_activity/loadSpecialtiesBySection.rpc'),(213,'rpc/loads/general_activity/loadLevelsBySpecialty.rpc'),(213,'rpc/loads/general_activity/loadClassGroupsByLevel.rpc'),(215,'modules/reports/activity/pExcelActivitiesByCourse'),(215,'modules/reports/activity/pExcelActivitiesByOptSubject'),(215,'modules/reports/activity/pPDFActivitiesByCourse'),(215,'modules/reports/activity/pPDFActivitiesByOptSubject'),(215,'rpc/loads/reports/activity/loadActivitiesByCourse.rpc'),(215,'rpc/loads/reports/activity/loadActivitiesByOptSubject.rpc'),(215,'rpc/loads/reports/activity/loadSchoolYear.rpc'),(215,'rpc/loads/reports/activity/loadOptSubject.rpc'),(215,'rpc/loads/reports/activity/loadSectionYear.rpc'),(215,'rpc/loads/reports/activity/loadSpecialtiesYear.rpc'),(215,'rpc/loads/reports/activity/loadLevelsYear.rpc'),(215,'rpc/loads/reports/activity/loadClassGroupYear.rpc'),(216,'modules/student_year_debts/fSetStudentYearDebts'),(216,'modules/student_year_debts/pSetStudentYearDebts'),(216,'rpc/loads/student_year_debts/loadRegisteredStudentsInScy.rpc'),(216,'rpc/loads/student_year_debts/loadLegalGuardianInfo.rpc'),(216,'rpc/loads/student_year_debts/loadGuardians.rpc'),(216,'rpc/loads/student_year_debts/loadGuardianInfo.rpc'),(216,'rpc/loads/student_year_debts/loadInvoiceInformation.rpc'),(217,'modules/student_year_debts/fVoidInvoice'),(217,'modules/student_year_debts/pVoidInvoice'),(217,'rpc/autocompleters/student_year_debts/loadInvoice.rpc'),(220,'modules/subject_course_retest/pNewSubjectCourseRetest'),(220,'rpc/loads/subject_course_retest/loadSectionByYear.rpc'),(220,'rpc/loads/subject_course_retest/loadLevelsBySection.rpc'),(220,'rpc/loads/subject_course_retest/loadSpecialtyByLevel.rpc'),(220,'rpc/loads/subject_course_retest/loadClassGroupSpecialtyLevelSection.rpc'),(220,'rpc/loads/subject_course_retest/loadSubjects.rpc'),(220,'rpc/loads/subject_course_retest/loadPeriodsBySubject.rpc'),(220,'rpc/loads/subject_course_retest/loadRetest.rpc'),(221,'modules/subject_course_retest_student/pNewSubjectCourseRetestStudent'),(221,'rpc/loads/subject_course_retest_student/loadSectionByYear.rpc'),(221,'rpc/loads/subject_course_retest_student/loadLevelsBySection.rpc'),(221,'rpc/loads/subject_course_retest_student/loadSpecialtyByLevel.rpc'),(221,'rpc/loads/subject_course_retest_student/loadClassGroupSpecialtyLevelSection.rpc'),(221,'rpc/loads/subject_course_retest_student/loadSubjects.rpc'),(221,'rpc/loads/subject_course_retest_student/loadPeriodsBySubject.rpc'),(221,'rpc/loads/subject_course_retest_student/loadRetest.rpc'),(221,'rpc/loads/subject_course_retest_student/loadStudents.rpc'),(223,'modules/optional_subject_retest/pNewOptionalSubjectRetest'),(223,'rpc/loads/optional_subject_retest/loadOptionalSubjects.rpc'),(223,'rpc/loads/optional_subject_retest/loadPeriods.rpc'),(223,'rpc/loads/optional_subject_retest/loadRetest.rpc'),(224,'modules/optional_subject_retest_student/pNewOptionalSubjectRetestStudent'),(224,'rpc/loads/optional_subject_retest/loadOptionalSubjects.rpc'),(224,'rpc/loads/optional_subject_retest/loadPeriods.rpc'),(224,'rpc/loads/optional_subject_retest/loadTable.rpc'),(226,'modules/resit_student/pGradeResitExam'),(226,'rpc/loads/resit_student/loadOptionalSubjectsBySchoolYear.rpc'),(226,'rpc/loads/resit_student/gradeStudentsForOptional.rpc'),(226,'rpc/loads/resit_student/loadSectionsBySchoolYear.rpc'),(226,'rpc/loads/resit_student/loadSpecialtiesBySection.rpc'),(226,'rpc/loads/resit_student/loadLevelsBySpecialty.rpc'),(226,'rpc/loads/resit_student/loadSubjectsByLevelAndLanguage.rpc'),(226,'rpc/loads/resit_student/gradeStudentsForMandatory.rpc'),(231,'modules/discount/pNewDiscount'),(231,'rpc/remoteValidation/discount/checkDiscount.rpc'),(232,'modules/discount/fUpdateDiscount'),(232,'modules/discount/pUpdateDiscount'),(232,'rpc/remoteValidation/discount/checkDiscount.rpc'),(234,'modules/year_discount/pAssignYearDiscount'),(234,'rpc/loads/year_discount/loadPaymentConceptContainer.rpc'),(234,'rpc/remoteValidation/year_discount/checkYearDiscount.rpc'),(234,'rpc/remoteValidation/year_discount/checkDiscounts.rpc'),(236,'modules/qualifying_document/pNewQualifyingDocument'),(236,'rpc/remoteValidation/qualifying_document/checkNameQualifyingDocument.rpc'),(237,'modules/qualifying_document/fUpdateQualifyingDocument'),(237,'modules/qualifying_document/pUpdateQualifyingDocument'),(237,'rpc/remoteValidation/qualifying_document/checkNameQualifyingDocument.rpc'),(239,'modules/year_qualifying_document/pYearQualifyingDocument'),(239,'rpc/loads/year_qualifying_document/loadQualifyingDocsByYear.rpc'),(240,'modules/resit_student/fDetermineResitsProcess'),(240,'modules/resit_student/pDetermineResitsProcess'),(240,'rpc/loads/resit_student/resits_process/loadSectionsBySchoolYear.rpc'),(240,'rpc/loads/resit_student/resits_process/loadSpecialtiesBySection.rpc'),(240,'rpc/loads/resit_student/resits_process/loadLevelsBySchoolYear.rpc'),(242,'modules/grade_subject_score/fAssignGradeSubjectScoreToStudents'),(242,'modules/grade_subject_score/pAssignGradeSubjectScoreToStudents'),(242,'rpc/loads/grade_subject_score/assignGradeSubjectScoreToStudents/loadSpecialtyByYearBySection.rpc'),(242,'rpc/loads/grade_subject_score/assignGradeSubjectScoreToStudents/loadLevelsBySpecialtyByYearBySection.rpc'),(242,'rpc/loads/grade_subject_score/assignGradeSubjectScoreToStudents/loadClassGroupsByLevel.rpc'),(242,'rpc/loads/grade_subject_score/assignGradeSubjectScoreToStudents/loadGradeSubjects.rpc'),(242,'rpc/loads/grade_subject_score/assignGradeSubjectScoreToStudents/loadStudentsByClassGroup.rpc'),(244,'modules/student_year_discount_values/fAssignDiscountsToStudent'),(244,'modules/student_year_discount_values/pAssignDiscountsToStudent'),(244,'rpc/loads/student_year_discount_values/loadDiscountDetails.rpc'),(246,'modules/income_stock/pNewIncomeStock'),(246,'rpc/autocompleters/income_stock/loadEmployees.rpc'),(246,'rpc/loads/item_stock/loadItemsByCategory.rpc'),(247,'modules/stock_request/PNewStockRequest'),(247,'rpc/loads/stock_request/loadItemCategory.rpc'),(247,'rpc/loads/stock_request/loadItems.rpc'),(247,'rpc/autocompleters/stock_request/loadEmployeesNotTeachersByDocument.rpc'),(247,'rpc/loads/stock_request/createItemsChart.rpc'),(247,'rpc/loads/stock_request/loadItemChart.rpc'),(247,'rpc/loads/stock_request/appendItemsToChart.rpc'),(248,'rpc/loads/employee/general/loadActivitiesForCalendar.rpc'),(248,'rpc/loads/employee/general/loadActivityNoEditableDialog.rpc'),(250,'modules/reports/ministry/pPDFServiceContract'),(250,'rpc/loads/reports/ministry/service_contract/loadSectionYear.rpc'),(250,'rpc/loads/reports/ministry/service_contract/loadSpecialtiesYear.rpc'),(250,'rpc/loads/reports/ministry/service_contract/loadLevelsYear.rpc'),(250,'rpc/loads/reports/ministry/service_contract/loadClassGroupYear.rpc'),(250,'rpc/loads/reports/ministry/service_contract/loadStudentsByCourse.rpc'),(250,'rpc/loads/reports/ministry/service_contract/loadPaymentConcept.rpc'),(251,'modules/reports/student_matriculated/pPDFMatriculatedStudentsByCourse'),(251,'rpc/loads/reports/student_matriculated/AuthorizationCourse.rpc'),(251,'rpc/loads/reports/student_matriculated/loadSectionYear.rpc'),(251,'rpc/loads/reports/student_matriculated/loadSpecialtiesYear.rpc'),(251,'rpc/loads/reports/student_matriculated/loadLevelsYear.rpc'),(251,'rpc/loads/reports/student_matriculated/loadClassGroupYear.rpc'),(252,'modules/reports/ministry/pRegistrationCertificatePDF'),(252,'rpc/autocompleters/reports/ministry/registration_certificate/loadStudents.rpc'),(252,'rpc/loads/reports/ministry/registration_certificate/loadInfo.rpc'),(253,'modules/reports/school_certificate/pPDFSchoolCertificate'),(253,'rpc/loads/reports/school_certificate/checkPendingSubjects.rpc'),(253,'rpc/loads/reports/school_certificate/loadSectionYear.rpc'),(253,'rpc/loads/reports/school_certificate/loadSpecialtiesYear.rpc'),(253,'rpc/loads/reports/school_certificate/loadLevelsYear.rpc'),(253,'rpc/loads/reports/school_certificate/loadClassGroupYear.rpc'),(253,'rpc/loads/reports/school_certificate/loadStudentsByCourse.rpc'),(254,'modules/year_resit_exam_ranges_ministry/pNewYearResitExamRangesMinistry'),(254,'rpc/loads/year_resit_exam_ranges_ministry/loadConfiguratedResitExamRanges.rpc'),(254,'rpc/loads/year_resit_exam_ranges_ministry/checkYearResitExamRangesContainer.rpc'),(254,'rpc/loads/year_resit_exam_ranges_ministry/loadYearResitExamRangesForm.rpc'),(255,'modules/reports/student_grade/pExcelStudentsGradesByPeriod'),(255,'modules/reports/student_grade/pPDFStudentsGradesByPeriod'),(255,'rpc/loads/reports/student_grade/loadSections.rpc'),(255,'rpc/loads/reports/student_grade/loadLevels.rpc'),(255,'rpc/loads/reports/student_grade/loadSpecialties.rpc'),(255,'rpc/loads/reports/student_grade/loadClassGroups.rpc'),(255,'pc/loads/reports/student_grade/loadSubjects.rpc'),(255,'pc/loads/reports/student_grade/loadPeriodsBySubject.rpc'),(255,'rpc/loads/reports/student_grade/loadGrades.rpc'),(256,'modules/resit_student/fDetermineMinistryResitsProcess'),(256,'modules/resit_student/pDetermineMinistryResitsProcess'),(256,'rpc/loads/resit_student/resits_process/loadSectionsBySchoolYear.rpc'),(256,'rpc/loads/resit_student/resits_process/loadSpecialtiesBySection.rpc'),(256,'rpc/loads/resit_student/resits_process/loadLevelsBySchoolYear.rpc'),(257,'modules/level_section_year/pDefineLevelOrder'),(257,'rpc/loads/level_section_year/loadSectionsTypesBySchoolYear.rpc'),(257,'rpc/loads/level_section_year/loadLevelsList.rpc'),(258,'modules/reports/ministry/fGradeSubjectScoreReport'),(258,'modules/reports/ministry/pGradeSubjectScoreReport'),(258,'rpc/loads/reports/ministry/grade_subject_score_report/loadSpecialtyByYearBySection.rpc'),(258,'rpc/loads/reports/ministry/grade_subject_score_report/loadLevelsBySpecialtyByYearBySection.rpc'),(258,'rpc/loads/reports/ministry/grade_subject_score_report/loadClassGroupsByLevel.rpc'),(258,'rpc/loads/reports/ministry/grade_subject_score_report/loadSpecialGradesByLevel.rpc'),(259,'modules/reports/ministry/fRegistrationRecord'),(259,'modules/reports/ministry/pRegistrationRecord'),(259,'rpc/loads/reports/ministry/registration_record/loadStudentsByClassGroup.rpc'),(259,'rpc/loads/reports/ministry/registration_record/checkIfStudents.rpc'),(259,'rpc/loads/reports/ministry/registration_record/loadSpecialtyByYearBySection.rpc'),(259,'rpc/loads/reports/ministry/registration_record/loadLevelsBySpecialtyByYearBySection.rpc'),(259,'rpc/loads/reports/ministry/registration_record/loadClassGroupsByLevel.rpc'),(260,'modules/reports/ministry/pViewFinalStudentGrades'),(260,'rpc/loads/reports/ministry/final_grades_report/loadSections.rpc'),(260,'rpc/loads/reports/ministry/final_grades_report/loadLevels.rpc'),(260,'rpc/loads/reports/ministry/final_grades_report/loadSpecialties.rpc'),(260,'rpc/loads/reports/ministry/final_grades_report/loadClassGroups.rpc'),(260,'rpc/loads/reports/ministry/final_grades_report/loadCommentByStudent.rpc'),(261,'modules/pre_registration/academic_board/fPreRegisteredSelection'),(261,'modules/pre_registration/academic_board/pSavePreRegistration'),(261,'modules/pre_registration/academic_board/pSaveWebPreRegistration'),(261,'rpc/loads/pre_registration/loadSpecialtiesBySection.rpc'),(261,'rpc/loads/pre_registration/loadLevelsBySchoolYear.rpc'),(261,'rpc/loads/pre_registration/loadLevelsBySchoolYear.rpc'),(261,'rpc/loads/pre_registration/loadPreRegistrationInfoForView.rpc'),(261,'rpc/loads/web/pre_registration/loadPreRegistrationInfoForView.rpc'),(262,'modules/reports/ministry/pResitTestScoreReport'),(262,'rpc/loads/reports/ministry/resit_test_score_report/loadSections.rpc'),(262,'rpc/loads/reports/ministry/resit_test_score_report/loadLevelsBySection.rpc'),(262,'rpc/loads/reports/ministry/resit_test_score_report/loadSpecialtyByLevel.rpc'),(262,'rpc/loads/reports/ministry/resit_test_score_report/loadClassGroups.rpc'),(262,'rpc/loads/reports/ministry/resit_test_score_report/loadCommentByStudent.rpc'),(263,'modules/user/pUserGeneralSearch'),(263,'rpc/autocompleters/user/loadUsersByDocument.rpc'),(263,'rpc/loads/user/loadProfilesByUser.rpc'),(263,'modules/user/centralViews/fCentralizedStudentInterface'),(263,'modules/user/centralViews/fEmployeeCentralView'),(263,'modules/user/centralViews/fGuardianCentralView'),(263,'modules/user/centralViews/fTeacherCentralView'),(264,'modules/reports/ministry/pPDFFinalSubjectScores'),(264,'rpc/loads/reports/ministry/final_scores/checkPendingScores.rpc'),(264,'rpc/loads/reports/ministry/final_scores/loadSectionYear.rpc'),(264,'rpc/loads/reports/ministry/final_scores/loadSpecialtiesYear.rpc'),(264,'rpc/loads/reports/ministry/final_scores/loadLevelsYear.rpc'),(264,'rpc/loads/reports/ministry/final_scores/loadClassGroupYear.rpc'),(264,'rpc/loads/reports/ministry/final_scores/loadStudentsByCourse.rpc'),(265,'modules/pre_registration/principal/fPreRegisteredSelection'),(265,'modules/pre_registration/principal/pSaveWebPreRegistration'),(265,'modules/pre_registration/principal/pSavePreRegistration'),(265,'rpc/loads/pre_registration/loadSectionsBySchoolYear.rpc'),(265,'rpc/loads/pre_registration/loadSpecialtiesBySection.rpc'),(265,'rpc/loads/pre_registration/loadLevelsBySchoolYear.rpc'),(265,'rpc/loads/pre_registration/loadPreRegistrationInfoForView.rpc'),(265,'rpc/loads/web/pre_registration/loadPreRegistrationInfoForView.rpc'),(266,'modules/year_pre_registration_document/pYearPreRegistrationDocument'),(266,'rpc/loads/year_pre_registration_document/loadDocumentsByYear.rpc'),(267,'modules/replicate_configuration/pNewReplication'),(267,'rpc/loads/replicate_configuration/loadReplicationOptions.rpc'),(269,'modules/payment_method/pNewPaymentMethod'),(269,'rpc/remoteValidation/payment_method/checkNamePaymentMethod.rpc'),(270,'modules/payment_method/fUpdatePaymentMethod'),(270,'modules/payment_method/pUpdatePaymentMethod'),(270,'rpc/remoteValidation/payment_method/checkNamePaymentMethod.rpc'),(271,'modules/user/fPasswordReset'),(271,'modules/user/pPasswordReset'),(271,'rpc/autocompleters/user/loadUsersByDocument.rpc'),(271,'rpc/autocompleters/user/loadUsersByUserName.rpc'),(273,'modules/pre_registration/school/pNewPreRegistration'),(273,'rpc/autocompleters/pre_registration/loadGuardian.rpc'),(273,'rpc/loads/pre_registration/loadRequiredDocuments.rpc'),(273,'rpc/remoteValidation/pre_registration/upload_file.rpc'),(273,'rpc/loads/pre_registration/loadStatesByCountry.rpc'),(273,'rpc/loads/pre_registration/loadSectionsBySchoolYear.rpc'),(273,'rpc/loads/pre_registration/loadSpecialtiesBySection.rpc'),(273,'rpc/loads/pre_registration/loadLevelsBySchoolYear.rpc'),(274,'modules/pre_registration/school/fPreRegisteredSelection'),(274,'modules/pre_registration/school/fUpdatePreRegistration'),(274,'modules/pre_registration/school/pUpdatePreRegistration'),(274,'rpc/loads/pre_registration/loadSectionsBySchoolYear.rpc'),(274,'rpc/loads/pre_registration/loadSpecialtiesBySection.rpc'),(274,'rpc/loads/pre_registration/loadLevelsBySchoolYear.rpc'),(274,'rpc/autocompleters/pre_registration/loadGuardian.rpc'),(274,'rpc/loads/pre_registration/loadRequiredDocuments.rpc'),(274,'rpc/remoteValidation/pre_registration/upload_file.rpc'),(274,'rpc/loads/pre_registration/loadStatesByCountry.rpc'),(275,'modules/student_year_document/pStudentYearDocument'),(275,'rpc/loads/student_year_document/loadSectionsBySchoolYear.rpc'),(275,'rpc/loads/student_year_document/loadLevelsBySection.rpc'),(275,'rpc/loads/student_year_document/loadSpecialtyByLevel.rpc'),(275,'rpc/loads/student_year_document/loadStudentsTable.rpc'),(275,'rpc/loads/student_year_document/loadStudentYearDocs.rpc'),(277,'modules/attendance/pRegisterAttendance'),(277,'modules/attendance/pRegisterAttendanceForClass'),(277,'rpc/loads/attendance/loadStudentsTable.rpc'),(277,'rpc/loads/attendance/loadStudentsByHour.rpc'),(277,'rpc/loads/attendance/loadSectionsBySchoolYear.rpc'),(277,'rpc/loads/attendance/loadSpecialtiesBySection.rpc'),(277,'rpc/loads/attendance/loadLevelsBySpecialty.rpc'),(277,'rpc/loads/attendance/loadClassGroupsByLevel.rpc'),(277,'rpc/loads/attendance/loadPeriodsByLevel.rpc'),(278,'modules/studentPromotion/pNewStudentPromotion'),(278,'rpc/loads/studentPromotion/loadSections.rpc'),(278,'rpc/loads/studentPromotion/loadLevelsBySection.rpc'),(278,'rpc/loads/studentPromotion/loadSpecialtyByLevel.rpc'),(278,'rpc/loads/studentPromotion/loadClassGroups.rpc'),(278,'rpc/loads/studentPromotion/loadStudentsToPromote.rpc'),(278,'rpc/loads/studentPromotion/loadPromotionInfo.rpc'),(278,'rpc/loads/studentPromotion/loadSections.rpc'),(278,'rpc/loads/studentPromotion/loadLevelsBySection.rpc'),(278,'rpc/loads/studentPromotion/loadSpecialtyByLevel.rpc'),(279,'modules/reports/student/fViewStudentListByCourse'),(279,'modules/reports/student/pViewStudentListByCourse'),(279,'rpc/loads/reports/ministry/grade_subject_score_report/loadSpecialtyByYearBySection.rpc'),(279,'rpc/loads/reports/ministry/grade_subject_score_report/loadLevelsBySpecialtyByYearBySection.rpc'),(279,'rpc/loads/reports/ministry/grade_subject_score_report/loadClassGroupsByLevel.rpc'),(279,'rpc/loads/reports/student/checkStudentListByClassGroup.rpc'),(280,'modules/reports/guardian/pViewGuardiansByYearReport'),(281,'modules/reports/report_card/pFinalSchoolScoresPDF'),(281,'rpc/loads/reports/report_card/checkPendingScores.rpc'),(281,'rpc/loads/reports/report_card/loadSectionYear.rpc'),(281,'rpc/loads/reports/report_card/loadSpecialtiesYear.rpc'),(281,'rpc/loads/reports/report_card/loadStudentsByCourse.rpc'),(281,'rpc/loads/reports/report_card/loadClassGroupYear.rpc'),(282,'modules/reports/period_evaluation/pPDFGeneratePeriodEvaluation'),(282,'rpc/loads/reports/period_evaluation/loadSectionsBySchoolYearWithCourses.rpc'),(282,'rpc/loads/reports/period_evaluation/loadSpecialtiesBySectionWithCourses.rpc'),(282,'rpc/loads/reports/period_evaluation/loadLevelsBySpecialtyWithCourses.rpc'),(282,'rpc/loads/reports/period_evaluation/loadClassGroupsByLevelWithCourses.rpc'),(282,'rpc/loads/reports/period_evaluation/loadStudentsByCourse.rpc'),(282,'rpc/loads/reports/period_evaluation/loadPeriodsByLevelWithCourses.rpc'),(283,'modules/reports/contacts_by_student/pPDFGenerateContactsListByCourse'),(283,'rpc/loads/reports/contacts_by_student/loadSectionsBySchoolYearWithCourses.rpc'),(283,'rpc/loads/reports/contacts_by_student/loadSpecialtiesBySectionWithCourses.rpc'),(283,'rpc/loads/reports/contacts_by_student/loadLevelsBySpecialtyWithCourses.rpc'),(283,'rpc/loads/reports/contacts_by_student/loadClassGroupsByLevelWithCourses.rpc'),(284,'modules/reports/contacts_by_student/pPDFGenerateContactsList'),(284,'rpc/loads/reports/contacts_by_student/loadSectionsBySchoolYear.rpc'),(285,'modules/reports/ministry/pYearPromotionCertificatePDF'),(285,'rpc/loads/reports/ministry/promotion_certificate/checkPendingScores.rpc'),(285,'rpc/loads/reports/ministry/promotion_certificate/loadSectionYear.rpc'),(285,'rpc/loads/reports/ministry/promotion_certificate/loadSpecialtiesYear.rpc'),(285,'rpc/loads/reports/ministry/promotion_certificate/loadLevelsYear.rpc'),(285,'rpc/loads/reports/ministry/promotion_certificate/loadClassGroupYear.rpc'),(285,'rpc/loads/reports/ministry/promotion_certificate/loadStudentsByCourse.rpc'),(286,'modules/reports/ministry/pCertificateOfAttainmentPDF'),(286,'rpc/loads/reports/ministry/attainment_certificate/checkPendingScores.rpc'),(286,'rpc/loads/reports/ministry/promotion_certificate/loadSectionYear.rpc'),(286,'rpc/loads/reports/ministry/promotion_certificate/loadSpecialtiesYear.rpc'),(286,'rpc/loads/reports/ministry/promotion_certificate/loadLevelsYear.rpc'),(286,'rpc/loads/reports/ministry/promotion_certificate/loadClassGroupYear.rpc'),(286,'rpc/loads/reports/ministry/promotion_certificate/loadStudentsByCourse.rpc'),(289,'modules/library_section/pNewLibrarySection'),(289,'rpc/remoteValidation/library_section/checkLibrarySection.rpc'),(290,'modules/library_section/fUpdateLibrarySection'),(290,'modules/library_section/pUpdateLibrarySection'),(290,'rpc/remoteValidation/library_section/checkLibrarySection.rpc'),(292,'modules/book_category/pNewBookCategory'),(292,'rpc/loads/book_category/loadSubcategory.rpc'),(292,'rpc/remoteValidation/book_category/checkNameMainOrSubcategory.rpc'),(293,'modules/book_category/fUpdateBookCategory'),(293,'modules/book_category/pUpdateBookCategory'),(293,'rpc/loads/book_category/loadSubcategoryForUpdate.rpc'),(293,'rpc/remoteValidation/book_category/checkNameMainOrSubcategory.rpc'),(294,'modules/book/pRegisterBook'),(294,'rpc/autocompleters/book/loadAuthors.rpc'),(294,'rpc/loads/book/loadSubCategories.rpc'),(295,'rpc/loads/loan/searchBook.rpc'),(295,'rpc/loads/loan/loadBookInfo.rpc'),(297,'modules/loan/pNewBookLoan'),(297,'rpc/autocompleters/loan/loadUsersByNameAndDocument.rpc'),(297,'rpc/loads/loan/searchBook.rpc'),(297,'rpc/loads/loan/loadBookInfo.rpc'),(297,'rpc/loads/loan/loadSelectedBookList.rpc'),(298,'modules/loan/pNewEquipmentOrStudyPlaceLoan'),(298,'rpc/loads/loan/searchEquipment.rpc'),(298,'rpc/autocompleters/loan/loadUsersByNameAndDocument.rpc'),(298,'rpc/loads/loan/searchStudyPlace.rpc'),(298,'rpc/autocompleters/loan/loadUsersByNameAndDocument.rpc'),(299,'modules/loan_return/pNewLoanReturn'),(299,'rpc/autocompleters/loan_return/loadUsersByNameAndDocument.rpc'),(299,'rpc/loads/loan_return/loadLoansByUser.rpc'),(299,'rpc/loads/loan_return/loadLoanDetail.rpc'),(300,'modules/reports/medical_file/pPDFGenerateMedicalFile'),(300,'rpc/autocompleters/reports/medical_file/loadStudents.rpc'),(300,'rpc/remoteValidation/reports/medical_file/verifyMedicalFileByStudent.rpc'),(302,'modules/equipment/fNewEquipment'),(302,'rpc/remoteValidation/equipment/checkCodeEquipment.rpc'),(303,'modules/equipment/fUpdateEquipment'),(303,'modules/equipment/pUpdateEquipment'),(303,'rpc/remoteValidation/equipment/checkCodeEquipment.rpc'),(305,'modules/study_place/pNewStudyPlace'),(305,'rpc/remoteValidation/study_place/checkNameStudyPlace.rpc'),(306,'modules/study_place/fUpdateStudyPlace'),(306,'modules/study_place/pUpdateStudyPlace'),(306,'rpc/remoteValidation/study_place/checkNameStudyPlace.rpc'),(307,'modules/schedule/pScheduleDefinition'),(307,'rpc/loads/schedule/loadSectionsBySchoolYear.rpc'),(307,'rpc/loads/schedule/loadSpecialtiesBySection.rpc'),(307,'rpc/loads/schedule/loadLevelsBySpecialty.rpc'),(307,'rpc/loads/schedule/loadClassGroupsByLevel.rpc'),(307,'rpc/loads/schedule/loadSubjectsByCourse.rpc'),(307,'rpc/remoteValidation/schedule/inactive_credit.rpc'),(307,'rpc/loads/schedule/loadHoursByCourse.rpc'),(308,'modules/school_year/fStartSchoolYear'),(308,'rpc/loads/school_year/loadConfigurations.rpc'),(315,'rpc/loads/student_details/student_grades/loadSubjectsTable.rpc'),(315,'rpc/loads/student_details/student_grades/chart.rpc'),(315,'rpc/loads/student_details/student_grades/loadComposedSubjectDetailDialog.rpc'),(315,'rpc/loads/student_details/student_grades/loadSubjectDetailDialog.rpc'),(315,'rpc/loads/student_details/student_grades/loadPeriodsBySchoolYear.rpc'),(315,'rpc/loads/student_details/student_grades/loadStudentsBySchoolYear.rpc'),(315,'rpc/remoteValidation/student_details/set_session.rpc'),(316,'rpc/loads/student_details/syllabus_files/loadStudentsBySchoolYear.rpc'),(316,'rpc/loads/student_details/attendance_files/loadPeriodsByStudentsBySchoolYear.rpc'),(316,'rpc/loads/student_details/attendance_files/loadAttendanceDetail.rpc'),(316,'rpc/remoteValidation/student_details/set_session.rpc'),(316,'rpc/loads/student_details/attendance_files/loadAttendanceDetailByType.rpc'),(317,'rpc/remoteValidation/student_details/set_session.rpc'),(317,'rpc/loads/student_details/transportation_detail/loadStudentsBySchoolYear.rpc'),(317,'rpc/loads/student_details/classmate_details/loadCourseClassmates.rpc'),(317,'rpc/loads/student_details/classmate_details/loadOptSubjectInfo.rpc'),(317,'rpc/loads/student_details/classmate_details/loadOptClassmate.rpc'),(317,'rpc/loads/student_details/classmate_details/loadPeriodsByLop.rpc'),(317,'rpc/loads/student_details/classmate_details/loadOptClassmateByPeriod.rpc'),(318,'rpc/loads/student_details/transportation_detail/loadTransportationInfo.rpc'),(318,'rpc/loads/student_details/transportation_detail/loadStudentsBySchoolYear.rpc'),(318,'rpc/remoteValidation/student_details/set_session.rpc'),(318,'rpc/loads/student_details/transportation_detail/loadShifts.rpc'),(318,'rpc/loads/student_details/transportation_detail/loadExtraTransportationInfo.rpc'),(319,'rpc/loads/student_details/syllabus_files/loadStudentsBySchoolYear.rpc'),(319,'rpc/loads/student_details/schedules/loadStudentSchedule.rpc'),(319,'rpc/remoteValidation/student_details/set_session.rpc'),(320,'rpc/loads/student_details/syllabus_files/loadStudentsBySchoolYear.rpc'),(320,'rpc/loads/guardian/account_balance/loadStudentDebts.rpc'),(320,'rpc/loads/guardian/account_balance/loadInvoiceDetail.rpc'),(320,'rpc/remoteValidation/student_details/set_session.rpc'),(324,'modules/student_year_debts/fShopping'),(324,'modules/student_year_debts/pShopping'),(324,'rpc/autocompleters/student_year_debts/loadStudentsBySchoolYear.rpc'),(324,'rpc/loads/student_year_debts/addPaymentMethod.rpc'),(324,'rpc/loads/student_year_debts/loadLegalGuardianInfo.rpc'),(324,'rpc/loads/student_year_debts/loadGuardians.rpc'),(324,'rpc/loads/student_year_debts/loadInvoiceInformation.rpc'),(324,'rpc/loads/student_year_debts/loadArticlesToBuy.rpc'),(324,'rpc/loads/student_year_debts/loadSelectedArticles.rpc'),(324,'rpc/loads/student_year_debts/loadInvoiceConfirmation.rpc'),(324,'rpc/loads/student_year_debts/loadPaymentMethod.rpc'),(325,'modules/student_year_debts/fSetOptionalDebtsForStudent'),(325,'modules/student_year_debts/pSetOptionalDebtsForStudent'),(325,'rpc/autocompleters/student_year_debts/loadStudentsBySchoolYear.rpc'),(325,'rpc/loads/student_year_debts/loadLegalGuardianInfo.rpc'),(325,'rpc/loads/student_year_debts/loadGuardians.rpc'),(325,'rpc/loads/student_year_debts/loadGuardianInfo.rpc'),(325,'rpc/loads/student_year_debts/loadInvoiceInformation.rpc'),(326,'modules/registration/pNewRegistration'),(326,'rpc/loads/registration/loadPreview.rpc'),(326,'rpc/loads/registration/loadRequiredDocuments.rpc'),(326,'rpc/remoteValidation/pre_registration/upload_file.rpc'),(326,'rpc/loads/pre_registration/loadStatesByCountry.rpc'),(326,'rpc/loads/pre_registration/loadSectionsBySchoolYear.rpc'),(326,'rpc/loads/pre_registration/loadSpecialtiesBySection.rpc'),(326,'rpc/loads/pre_registration/loadLevelsBySchoolYear.rpc'),(326,'rpc/loads/registration/loadPaymentConceptsByLevel.rpc'),(326,'rpc/loads/registration/loadDiscountsByPaymentConcepts.rpc'),(326,'rpc/loads/pre_registration/loadGuardianEmployee.rpc'),(328,'modules/reports/payed_debts/pExcelPayedDebts'),(328,'modules/reports/payed_debts/pPDFPayedDebts'),(328,'rpc/autocompleters/payment_agreement_group/loadStudentsByYear.rpc'),(328,'rpc/loads/reports/payed_debts/loadSectionsByYear(Lvl).rpc'),(328,'rpc/loads/reports/payed_debts/loadLevelsBySection(Lvl).rpc'),(328,'rpc/loads/reports/payed_debts/loadPayedDebts.rpc'),(329,'modules/reports/student_grade/pExcelFinalStudentsGrades'),(329,'modules/reports/student_grade/pPDFFinalStudentsGrades'),(329,'rpc/loads/reports/ministry/resit_test_score_report/loadSections.rpc'),(329,'rpc/loads/reports/ministry/resit_test_score_report/loadLevelsBySection.rpc'),(329,'rpc/loads/reports/ministry/resit_test_score_report/loadSpecialtyByLevel.rpc'),(329,'rpc/loads/reports/ministry/resit_test_score_report/loadClassGroups.rpc'),(329,'rpc/loads/reports/student_grade/loadCommentByStudent.rpc'),(331,'modules/payment_agreement_group/pNewPaymentAgreementGroup'),(331,'rpc/remoteValidation/payment_agreement_group/checkCode.rpc'),(332,'modules/payment_agreement_group/fUpdatePaymentAgreementGroup'),(332,'modules/payment_agreement_group/pUpdatePaymentAgreementGroup'),(332,'rpc/loads/payment_agreement_group/loadCodes.rpc'),(332,'rpc/remoteValidation/payment_agreement_group/checkCode.rpc'),(333,'modules/payment_agreement_group/fAssignPaymentAgreementToStudent'),(333,'modules/payment_agreement_group/pAssignPaymentAgreementToStudent'),(333,'rpc/autocompleters/payment_agreement_group/loadStudentsByYear.rpc'),(334,'modules/reports/unpayed_debts/pExcelUnpayedDebts'),(334,'modules/reports/unpayed_debts/pPDFUnpayedDebts'),(334,'rpc/loads/reports/unpayed_debts/loadUnpayedDebts.rpc'),(335,'modules/reports/students_by_debts/fStudentsByDebtsReport'),(335,'modules/reports/students_by_debts/pExcelStudentsByDebts'),(335,'modules/reports/students_by_debts/pPDFStudentsByDebts'),(335,'rpc/loads/reports/students_by_debts/loadSpecialtyByYearBySection.rpc'),(335,'rpc/loads/reports/students_by_debts/loadLevelsBySpecialtyByYearBySection.rpc'),(335,'rpc/loads/reports/students_by_debts/loadPaymentConceptsByLevel.rpc'),(335,'rpc/loads/reports/students_by_debts/loadClassGroupsByLevel.rpc'),(335,'rpc/loads/reports/students_by_debts/loadStudentsByDebtsByLevel.rpc'),(336,'modules/student_year_mandatory_payment/pCheckPaymentByStudent'),(336,'rpc/autocompleters/student_year_mandatory_payment/loadStudents.rpc'),(336,'rpc/loads/student_year_mandatory_payment/loadPaymentsByStudent.rpc'),(337,'modules/top_students_awards/pNewTopStudentsAwards'),(337,'rpc/loads/top_students_awards/loadPeriodsGroupBySchoolYear.rpc'),(337,'rpc/loads/top_students_awards/loadPeriodsByPeriodGroup.rpc'),(337,'rpc/loads/top_students_awards/checkAveragesGradesByPeriodAndYear.rpc'),(338,'modules/reports/letter_of_commitment/pPDFLetterOfCommitment'),(338,'rpc/loads/reports/letter_of_commitment/loadSubjectField.rpc'),(338,'rpc/loads/reports/letter_of_commitment/loadStudentsByYear.rpc'),(339,'modules/book/pRegisterBookCopy'),(339,'rpc/loads/book/searchBook.rpc'),(339,'rpc/loads/book/loadCopies.rpc'),(340,'modules/invoice/fChangeInvoiceData'),(340,'modules/invoice/pChangeInvoiceData'),(340,'rpc/autocompleters/payment_agreement_group/loadStudentsByYear.rpc'),(340,'rpc/loads/student_year_debts/loadLegalGuardianInfo.rpc'),(340,'rpc/loads/student_year_debts/loadGuardians.rpc'),(340,'rpc/loads/student_year_debts/loadGuardianInfo.rpc'),(340,'rpc/loads/student_year_debts/loadInvoiceInformation.rpc'),(341,'modules/invoice/fPrintInvoices'),(341,'modules/invoice/pPrintInvoices'),(341,'rpc/loads/reports/ministry/registration_record/loadSpecialtyByYearBySection.rpc'),(341,'rpc/loads/reports/ministry/registration_record/loadLevelsBySpecialtyByYearBySection.rpc'),(341,'rpc/loads/invoice/checkInvoicesNumberNoRepeat.rpc'),(342,'modules/reports/school_certificate/pPDFRegistrationCertificate'),(342,'rpc/loads/reports/school_certificate/registration/loadStudentsTable.rpc'),(342,'rpc/loads/reports/school_certificate/registration/loadSectionsBySchoolYear.rpc'),(342,'rpc/loads/reports/school_certificate/registration/loadSpecialtiesBySection.rpc'),(342,'rpc/loads/reports/school_certificate/registration/loadLevelsBySpecialty.rpc'),(342,'rpc/loads/reports/school_certificate/registration/loadClassGroupsByLevel.rpc'),(343,'modules/class_group/pChangeStudentClassGroup'),(343,'modules/class_group/generateEvaluationReportPDF'),(343,'rpc/loads/class_group/loadChangeCourseDialog.rpc'),(343,'rpc/loads/class_group/loadStudentsTable.rpc'),(343,'rpc/loads/class_group/loadSectionsBySchoolYear.rpc'),(343,'rpc/loads/class_group/loadSpecialtiesBySection.rpc'),(343,'rpc/loads/class_group/loadLevelsBySpecialty.rpc'),(343,'rpc/loads/class_group/loadClassGroupsByLevel.rpc'),(344,'modules/student_year_debts/fChooseMonthForCurrentDeferred'),(344,'modules/student_year_debts/fPayCurrentDeferred'),(344,'modules/student_year_debts/pPayCurrentDeferred'),(344,'rpc/autocompleters/student_year_debts/loadStudents.rpc'),(345,'modules/invoice/fPrintInvoice'),(345,'modules/invoice/pPrintInvoice'),(345,'rpc/autocompleters/student_year_debts/loadStudents.rpc'),(345,'rpc/loads/invoice/loadInvoicePreview.rpc'),(345,'rpc/remoteValidation/invoice/checkInvoiceNumber.rpc'),(346,'modules/student_year_debts/fSetOptionalDebtsForStudent'),(346,'modules/student_year_debts/pSetOptionalDebtsForStudent'),(346,'rpc/autocompleters/student_year_debts/loadStudentsBySchoolYear.rpc'),(346,'rpc/loads/student_year_debts/loadLegalGuardianInfo.rpc'),(346,'rpc/loads/student_year_debts/loadGuardians.rpc'),(346,'rpc/loads/student_year_debts/loadGuardianInfo.rpc'),(346,'rpc/loads/student_year_debts/loadInvoiceInformation.rpc'),(347,'modules/level/pChangeStudentLevel'),(347,'modules/level/generateEvaluationReportPDF'),(347,'rpc/loads/level/generateInvoiceSummary.rpc'),(347,'rpc/loads/level/loadDiscountsByPaymentConcepts.rpc'),(347,'rpc/loads/level/paymentConceptSelection.rpc'),(347,'rpc/loads/level/loadChangeCourseDialog.rpc'),(347,'rpc/loads/level/loadStudentsTable.rpc'),(347,'rpc/loads/level/loadSectionsBySchoolYear.rpc'),(347,'rpc/loads/level/loadSpecialtiesBySection.rpc'),(347,'rpc/loads/level/loadLevelsBySpecialty.rpc'),(347,'rpc/loads/level/loadClassGroupsByLevel.rpc'),(126,'rpc/loads/student_criteria_grade/loadHistoryByStudent.rpc'),(127,'rpc/loads/opt_student_criteria_grade/loadHistoryByStudent.rpc'),(137,'rpc/loads/grade_change_log/loadHistoryByStudent.rpc'),(138,'rpc/loads/opt_student_criteria_grade/loadHistoryByStudent.rpc'),(140,'rpc/remoteValidation/activity/upload_file_std.rpc'),(140,'rpc/remoteValidation/message/delete_attachment.rpc'),(145,'rpc/loads/student_criteria_grade/discipline/loadHistoryByStudent.rpc'),(146,'rpc/loads/student_criteria_grade/discipline/loadHistoryByStudent.rpc'),(209,'rpc/remoteValidation/activity/delete_attachment.rpc'),(209,'rpc/remoteValidation/activity/upload_file.rpc'),(209,'rpc/loads/activity/loadAttachmentsDetails.rpc'),(209,'rpc/loads/activity/loadActivitiesBySubjectAndPeriod.rpc'),(209,'rpc/loads/activity/loadCriteriasByActivity.rpc'),(209,'rpc/remoteValidation/activity/check_class_groups.rpc'),(210,'rpc/remoteValidation/opt_activity/delete_attachment.rpc'),(210,'rpc/remoteValidation/opt_activity/upload_file.rpc'),(210,'rpc/loads/opt_activity/loadAttachmentsDetails.rpc'),(210,'rpc/loads/opt_activity/loadCriteriasByActivity.rpc'),(356,'modules/user_course_comment_setup/pUserCourseCommentSetup'),(356,'rpc/loads/user_course_comment_setup/loadSectionYear.rpc'),(356,'rpc/loads/user_course_comment_setup/loadSpecialtiesYear.rpc'),(356,'rpc/loads/user_course_comment_setup/loadLevelsYear.rpc'),(356,'rpc/loads/user_course_comment_setup/loadClassGroupYear.rpc'),(356,'rpc/loads/user_course_comment_setup/loadCourseCommentCurrentConfiguration.rpc'),(361,'modules/user_course_comment_setup/pSetCommentByCourse'),(361,'rpc/loads/user_course_comment_setup/loadClassGroupYearByUser.rpc'),(361,'rpc/loads/user_course_comment_setup/loadLevelsYearByUser.rpc'),(361,'rpc/loads/user_course_comment_setup/loadSectionYearByUser.rpc'),(361,'rpc/loads/user_course_comment_setup/loadSpecialtiesYearByUser.rpc'),(361,'rpc/loads/user_course_comment_setup/loadStudentsByCourse.rpc'),(361,'rpc/loads/user_course_comment_setup/loadPeriodsByLevel.rpc'),(354,'modules/skills/pNewSkill'),(354,'rpc/remoteValidation/skills/checkDescriptionSkill.rpc'),(355,'modules/skills/fUpdateSkill'),(355,'modules/skills/pUpdateSkill'),(355,'rpc/remoteValidation/skills/checkDescriptionSkill.rpc'),(355,'rpc/autocompleters/skills/loadSkills.rpc'),(359,'modules/schedule/pAutoScheduleDefinition'),(359,'modules/schedule/pSaveHourDistribution'),(359,'modules/schedule/pSaveRestrictions'),(359,'rpc/loads/schedule/loadCurrentSetupSchedule.rpc'),(359,'rpc/loads/schedule/loadMissingSetupSchedule.rpc'),(359,'rpc/loads/schedule/loadSectionsBySchoolYear.rpc'),(359,'rpc/loads/schedule/loadSpecialtiesBySection.rpc'),(359,'rpc/loads/schedule/loadLevelsBySpecialty.rpc'),(359,'rpc/loads/schedule/loadClassGroupsByLevel.rpc'),(359,'rpc/loads/schedule/loadSubjectsByCourseWithRestrictions.rpc'),(359,'rpc/loads/schedule/loadConfirmation.rpc'),(359,'rpc/loads/schedule/loadRestrictions.rpc'),(359,'rpc/loads/schedule/configureHoursDistribution.rpc'),(362,'rpc/loads/school_year/loadConfigurations.rpc'),(364,'modules/student_period_exam/pGradePeriodExam.php'),(364,'rpc/student_period_exam/loadClassGroupsByLevel.rpc.php'),(364,'rpc/student_period_exam/loadHistory.rpc.php'),(364,'rpc/student_period_exam/loadLevelsBySpecialty.rpc.php'),(364,'rpc/student_period_exam/loadPeriodsByLevel.rpc.php'),(364,'rpc/student_period_exam/loadPeriodsByOptSubject.rpc.php'),(364,'rpc/student_period_exam/loadSectionsBySchoolYear.rpc.php'),(364,'rpc/student_period_exam/loadSpecialtiesBySection.rpc.php'),(364,'rpc/student_period_exam/loadStudentToGradeMandatory.rpc.php'),(364,'rpc/student_period_exam/loadStudentToGradeOpt.rpc.php'),(364,'rpc/student_period_exam/loadSubjectsByCourseAndPeriod.rpc.php'),(364,'rpc/student_period_exam/loadSubjectsByYearAndLanguage.rpc.php');
/*!40000 ALTER TABLE `allowed_pages_by_process` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `area_guardian`
--

DROP TABLE IF EXISTS `area_guardian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `area_guardian` (
  `serial_arg` int(11) NOT NULL AUTO_INCREMENT,
  `name_arg` varchar(64) NOT NULL,
  `status_arg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'INACTIVE',
  PRIMARY KEY (`serial_arg`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `area_guardian`
--

LOCK TABLES `area_guardian` WRITE;
/*!40000 ALTER TABLE `area_guardian` DISABLE KEYS */;
INSERT INTO `area_guardian` VALUES (1,'ADMINISTRACIÓN,CONTABILIDAD Y FINANZAS','ACTIVE'),(2,'ADUANA Y COMERCIO EXTERIOR','ACTIVE'),(3,'ATENCIÓN AL CLIENTE','ACTIVE'),(4,'COMERCIAL Y NEGOCIOS','ACTIVE'),(5,'COMUNICACIÓN, RELACIONES INSTITUCIONALES Y PÚBLICAS','ACTIVE'),(6,'DISEÑO','ACTIVE'),(7,'EDUCACIÓN E INVESTIGACIÓN','ACTIVE'),(8,'GASTRONOMIA Y TURISMO','ACTIVE'),(9,'GERENCIA','ACTIVE'),(10,'INGENIERÍA CIVIL Y CONSTRUCCIÓN','ACTIVE'),(11,'INGENIERÍAS','ACTIVE'),(12,'LEGALES','ACTIVE'),(13,'MARKETING Y PUBLICIDAD','ACTIVE'),(14,'MINERÍA, PETROLEO Y GAS','ACTIVE'),(15,'OFICIOS Y OTROS','ACTIVE'),(16,'SALUD','ACTIVE');
/*!40000 ALTER TABLE `area_guardian` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `article`
--

DROP TABLE IF EXISTS `article`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `article` (
  `serial_art` int(11) NOT NULL AUTO_INCREMENT,
  `code_art` varchar(10) NOT NULL,
  `name_art` varchar(250) NOT NULL,
  `stock_art` int(11) NOT NULL,
  `status_art` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_art`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `article`
--

LOCK TABLES `article` WRITE;
/*!40000 ALTER TABLE `article` DISABLE KEYS */;
/*!40000 ALTER TABLE `article` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `aspirant_documents`
--

DROP TABLE IF EXISTS `aspirant_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspirant_documents` (
  `serial_asdc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_asstu` int(11) DEFAULT NULL,
  `serial_yasdc` int(11) DEFAULT NULL,
  `filename_pdc` varchar(500) DEFAULT NULL,
  `status_pdc` enum('PENDING','SUBMITTED') NOT NULL DEFAULT 'PENDING',
  PRIMARY KEY (`serial_asdc`),
  KEY `fk_serial_year_asdc_idx` (`serial_yasdc`),
  KEY `fk_serial_aspri_stu_idx` (`serial_asstu`),
  CONSTRAINT `fk_serial_aspri_stu` FOREIGN KEY (`serial_asstu`) REFERENCES `aspirant_student` (`serial_asstu`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_serial_year_asdc` FOREIGN KEY (`serial_yasdc`) REFERENCES `year_aspirant_documents` (`serial_yasdc`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `aspirant_documents`
--

LOCK TABLES `aspirant_documents` WRITE;
/*!40000 ALTER TABLE `aspirant_documents` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspirant_documents` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `aspirant_family`
--

DROP TABLE IF EXISTS `aspirant_family`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspirant_family` (
  `serial_asfml` int(11) NOT NULL AUTO_INCREMENT,
  `serial_asgu` int(11) NOT NULL,
  `first_surname_asfml` varchar(255) NOT NULL,
  `last_surname_asfml` varchar(255) DEFAULT NULL,
  `phone_asfml` varchar(255) DEFAULT NULL,
  `status_asfml` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `main_street` varchar(100) DEFAULT NULL,
  `secundary_street` varchar(100) DEFAULT NULL,
  `number_street` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`serial_asfml`),
  KEY `fk_serial_guardian3_idx` (`serial_asgu`),
  CONSTRAINT `fk_serial_guardian3` FOREIGN KEY (`serial_asgu`) REFERENCES `aspirant_guardian` (`serial_asgu`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `aspirant_family`
--

LOCK TABLES `aspirant_family` WRITE;
/*!40000 ALTER TABLE `aspirant_family` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspirant_family` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `aspirant_guardian`
--

DROP TABLE IF EXISTS `aspirant_guardian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspirant_guardian` (
  `serial_asgu` int(11) NOT NULL AUTO_INCREMENT,
  `serial_asstu` int(11) DEFAULT NULL,
  `serial_wus` int(11) NOT NULL,
  `serial_emp` int(11) DEFAULT NULL,
  `serial_nnt` int(11) DEFAULT NULL,
  `serial_elg` int(11) DEFAULT NULL,
  `serial_ocg` int(11) DEFAULT NULL,
  `serial_dgr` int(11) DEFAULT NULL,
  `serial_sch` int(11) DEFAULT NULL,
  `id_grd` varchar(13) NOT NULL,
  `first_name_asgu` varchar(512) NOT NULL,
  `last_name_asgu` varchar(512) NOT NULL,
  `birthdate_asgu` date DEFAULT NULL,
  `gender_asgu` enum('MALE','FEMALE') NOT NULL,
  `marital_status_asgu` enum('SINGLE','MARRIED','DIVORCED','WIDOWED','UNMARRIED PARTNERS') NOT NULL DEFAULT 'MARRIED',
  `alumnus_asgu` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `phone_asgu` varchar(30) NOT NULL,
  `mobile_asgu` varchar(30) DEFAULT NULL,
  `company_name_asgu` varchar(100) DEFAULT NULL,
  `company_activity_asgu` varchar(80) DEFAULT NULL,
  `role_in_company_asgu` varchar(60) DEFAULT NULL,
  `time_in_job_asgu` int(11) DEFAULT NULL,
  `company_addres_asgu` varchar(45) DEFAULT NULL,
  `company_phone_asgu` varchar(20) DEFAULT NULL,
  `email_asgu` varchar(256) DEFAULT NULL,
  `email2_asgu` varchar(150) DEFAULT NULL,
  `email3_asgu` varchar(150) DEFAULT NULL,
  `lives_with_student_grd` enum('YES','NO') DEFAULT 'YES',
  `allow_to_pick_student_grd` enum('YES','NO') DEFAULT 'NO',
  `observation_grd` text,
  `status_grd` enum('ACTIVE','INACTIVE','BLOCKED') NOT NULL DEFAULT 'ACTIVE',
  `academic_title_asgu` varchar(45) DEFAULT NULL,
  `university_acd_asgu` varchar(45) DEFAULT NULL,
  `graduate degree_asgu` varchar(45) DEFAULT NULL,
  `university_degree_asgu` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`serial_asgu`),
  KEY `serial_wus_idx` (`serial_wus`),
  KEY `serial_emp_idx` (`serial_emp`),
  KEY `serial_elg_idx` (`serial_elg`),
  KEY `serial_ocg_idx` (`serial_ocg`),
  KEY `serial_dgr_idx` (`serial_dgr`),
  KEY `serial_sch_idx` (`serial_sch`),
  KEY `fk_serial_nnt_idx` (`serial_nnt`),
  KEY `fk_aspirtant_stu_idx` (`serial_asstu`),
  CONSTRAINT `fk_aspirtant_stu` FOREIGN KEY (`serial_asstu`) REFERENCES `aspirant_student` (`serial_asstu`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_serial_nnt` FOREIGN KEY (`serial_nnt`) REFERENCES `nationality` (`serial_nnt`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_elg` FOREIGN KEY (`serial_elg`) REFERENCES `education_level_guardian` (`serial_elg`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_emp` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_ocg` FOREIGN KEY (`serial_ocg`) REFERENCES `occupation_guardian` (`serial_ocg`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `aspirant_guardian`
--

LOCK TABLES `aspirant_guardian` WRITE;
/*!40000 ALTER TABLE `aspirant_guardian` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspirant_guardian` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `aspirant_guardian_addres`
--

DROP TABLE IF EXISTS `aspirant_guardian_addres`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspirant_guardian_addres` (
  `serial_asguad` int(11) NOT NULL AUTO_INCREMENT COMMENT 'clave primaria de la tabla guardian_address, autoincremental',
  `serial_asgu` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla guardian',
  `serial_ste` int(11) NOT NULL COMMENT 'clave foranea perteneciante a la tabla provincia',
  `serial_cnt` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla canton',
  `serial_par` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla parroquia',
  `serial_zne` int(11) DEFAULT NULL COMMENT 'clave foranea perteneciente a la tabla zona',
  `main_street_gda` varchar(64) NOT NULL,
  `number_gda` varchar(32) NOT NULL,
  `secondary_street_gda` varchar(64) DEFAULT NULL,
  `address_type_gda` enum('HOME','WORK','OTHER') NOT NULL DEFAULT 'OTHER',
  `phone1_gda` varchar(32) DEFAULT NULL,
  `phone2_gda` varchar(32) DEFAULT NULL,
  `main_address_gda` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `status_gda` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE' COMMENT 'indica si la direccion esta en uso o esta borrada',
  PRIMARY KEY (`serial_asguad`),
  KEY `FK_addressg_has_state` (`serial_ste`),
  KEY `FK_addressg_has_county` (`serial_cnt`),
  KEY `FK_addressg_has_parish` (`serial_par`),
  KEY `FK_addressg_has_zone` (`serial_zne`),
  KEY `serial_asgu_idx` (`serial_asgu`),
  CONSTRAINT `serial_asgu` FOREIGN KEY (`serial_asgu`) REFERENCES `aspirant_guardian` (`serial_asgu`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `aspirant_guardian_addres`
--

LOCK TABLES `aspirant_guardian_addres` WRITE;
/*!40000 ALTER TABLE `aspirant_guardian_addres` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspirant_guardian_addres` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `aspirant_report`
--

DROP TABLE IF EXISTS `aspirant_report`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspirant_report` (
  `serial_asre` int(11) NOT NULL AUTO_INCREMENT,
  `serial_asstu` int(11) DEFAULT NULL,
  `serial_tyrp` int(11) DEFAULT NULL,
  `comment1` varchar(45) DEFAULT NULL,
  `serial_usr1` int(11) DEFAULT NULL,
  `comment2` varchar(45) DEFAULT NULL,
  `serial_user2` int(11) DEFAULT NULL,
  PRIMARY KEY (`serial_asre`),
  KEY `serial_type_idx` (`serial_tyrp`),
  KEY `fk_serial_asstu3_idx` (`serial_asstu`),
  CONSTRAINT `fk_serial_asstu3` FOREIGN KEY (`serial_asstu`) REFERENCES `aspirant_student` (`serial_asstu`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_type` FOREIGN KEY (`serial_tyrp`) REFERENCES `type_report` (`serial_tyrp`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `aspirant_report`
--

LOCK TABLES `aspirant_report` WRITE;
/*!40000 ALTER TABLE `aspirant_report` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspirant_report` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `aspirant_siblings`
--

DROP TABLE IF EXISTS `aspirant_siblings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspirant_siblings` (
  `serial_assi` int(11) NOT NULL AUTO_INCREMENT,
  `serial_asstu` int(11) DEFAULT NULL,
  `serial_sch` int(11) DEFAULT NULL,
  `Fisrt_name_sibling` varchar(45) DEFAULT NULL,
  `Last_name_sibling` varchar(45) DEFAULT NULL,
  `Birthday_sibling` date DEFAULT NULL,
  PRIMARY KEY (`serial_assi`),
  KEY `serail_asstu_idx` (`serial_asstu`),
  KEY `serial_sch_idx` (`serial_sch`),
  CONSTRAINT `serail_asstu` FOREIGN KEY (`serial_asstu`) REFERENCES `aspirant_student` (`serial_asstu`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_sch` FOREIGN KEY (`serial_sch`) REFERENCES `school` (`serial_sch`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Hermanos del aspirante';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `aspirant_siblings`
--

LOCK TABLES `aspirant_siblings` WRITE;
/*!40000 ALTER TABLE `aspirant_siblings` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspirant_siblings` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `aspirant_student`
--

DROP TABLE IF EXISTS `aspirant_student`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspirant_student` (
  `serial_asstu` int(11) NOT NULL,
  `serial_wus` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_nnt` int(11) DEFAULT NULL,
  `serial_dgr` int(11) DEFAULT NULL,
  `serial_ste` int(11) DEFAULT NULL,
  `serial_asfml` int(11) DEFAULT NULL,
  `serial_admission` int(11) DEFAULT NULL,
  `id_asstu` varchar(10) DEFAULT NULL,
  `first_name_asstu` varchar(512) NOT NULL,
  `last_name_asstu` varchar(512) NOT NULL,
  `birthdate_asstu` date NOT NULL,
  `gender_asstu` enum('MALE','FEMALE') NOT NULL,
  `address_asstu` text NOT NULL,
  `phone_asstu` varchar(30) NOT NULL,
  `first_name_father_asstu` varchar(100) DEFAULT NULL,
  `last_name_father_asstu` varchar(100) DEFAULT NULL,
  `first_name_mother_asstu` varchar(100) DEFAULT NULL,
  `last_name_mother_asstu` varchar(100) DEFAULT NULL,
  `city_birth_asstu` varchar(100) DEFAULT NULL,
  `blood_type_asstu` varchar(10) DEFAULT NULL,
  `allergies_asstu` text,
  `lives_with_asstu` enum('PARENT','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') NOT NULL,
  `photo_asstu` varchar(1024) DEFAULT NULL,
  `email_asstu` varchar(256) DEFAULT NULL,
  `rep_first_name_asstu` varchar(100) DEFAULT NULL,
  `rep_last_name_asstu` varchar(100) DEFAULT NULL,
  `rep_relationship_asstu` enum('PARENT','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') DEFAULT NULL,
  `rep_birthdate_asstu` date DEFAULT NULL,
  `rep_city_birth_asstu` varchar(100) DEFAULT NULL,
  `rep_marital_status_asstu` enum('SINGLE','MARRIED','DIVORCED','WIDOWED','UNMARRIED PARTNERS') DEFAULT NULL,
  `rep_occupation_asstu` varchar(100) DEFAULT NULL,
  `rep_address_asstu` text,
  `rep_phone_asstu` varchar(13) DEFAULT NULL,
  `rep_mobile_asstu` varchar(13) DEFAULT NULL,
  `rep_company_name_asstu` varchar(80) DEFAULT NULL,
  `rep_company_activity_asstu` text,
  `rep_company_phone_asstu` varchar(13) DEFAULT NULL,
  `rep_photo_asstu` varchar(1024) DEFAULT NULL,
  `rep_gender_asstu` enum('MALE','FEMALE') DEFAULT NULL,
  `rep_id_asstu` varchar(13) DEFAULT NULL,
  `rep_email_asstu` varchar(256) DEFAULT NULL,
  `is_listener_asstu` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `submitted_docs_asstu` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `siblings_asstu` int(11) DEFAULT NULL,
  `position_sibling_asstu` int(11) DEFAULT NULL,
  `siblings_in_school` enum('YES','NO') DEFAULT 'NO',
  `siblings_in_school_detail` varchar(50) DEFAULT NULL,
  `insert_date_asstu` datetime DEFAULT NULL,
  `modification_date_asstu` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Parents_live_asstu` enum('together','separated') NOT NULL DEFAULT 'together',
  `Repeat_level` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `reason_for_repeat` tinytext,
  `Appplication_status` enum('waiting_list','denied','progress','slope','slope_documents','ready to commission','approved','apply next year','collectorship','academic secretary') NOT NULL DEFAULT 'progress',
  `telling_of_entries` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`serial_asstu`),
  KEY `fk_relationship_205` (`serial_dgr`),
  KEY `fk_relationship_206` (`serial_nnt`),
  KEY `fk_relationship_242` (`serial_ste`),
  KEY `serial_lvl_idx` (`serial_lvl`),
  KEY `serial_scy_idx` (`serial_scy`),
  KEY `serial_set_idx` (`serial_set`),
  KEY `serial_spt_idx` (`serial_spt`),
  KEY `fk_serial_asfml_idx` (`serial_asfml`),
  KEY `serial_admission_idx` (`serial_admission`),
  CONSTRAINT `fk_serial_asfml` FOREIGN KEY (`serial_asfml`) REFERENCES `aspirant_family` (`serial_asfml`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_admission` FOREIGN KEY (`serial_admission`) REFERENCES `admission` (`serial_admission`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_dgr` FOREIGN KEY (`serial_dgr`) REFERENCES `degree` (`serial_dgr`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_lvl` FOREIGN KEY (`serial_lvl`) REFERENCES `level` (`serial_lvl`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_nnt` FOREIGN KEY (`serial_nnt`) REFERENCES `nationality` (`serial_nnt`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_scy` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_set` FOREIGN KEY (`serial_set`) REFERENCES `section` (`serial_set`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_spt` FOREIGN KEY (`serial_spt`) REFERENCES `specialty` (`serial_spt`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_ste` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='web_pre_registration';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `aspirant_student`
--

LOCK TABLES `aspirant_student` WRITE;
/*!40000 ALTER TABLE `aspirant_student` DISABLE KEYS */;
/*!40000 ALTER TABLE `aspirant_student` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `attendance`
--

DROP TABLE IF EXISTS `attendance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `attendance` (
  `serial_ace` int(11) NOT NULL AUTO_INCREMENT,
  `serial_std` int(11) DEFAULT NULL,
  `serial_scd` int(11) DEFAULT NULL,
  `serial_lop` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_sps` int(11) DEFAULT NULL,
  `date_ace` date NOT NULL,
  `type_ace` enum('UNEXCUSED_ABSENCE','EXCUSED_ABSENCE','DELAY','ESCAPE') NOT NULL,
  `status_ace` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ace`),
  KEY `fk_relationship_289` (`serial_scd`),
  KEY `fk_relationship_290` (`serial_std`),
  KEY `fk_relationship_28601` (`serial_lop`),
  KEY `fk_relationship_28402` (`serial_sbc`),
  CONSTRAINT `fk_relationship_28402` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_28601` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`),
  CONSTRAINT `fk_relationship_289` FOREIGN KEY (`serial_scd`) REFERENCES `schedule` (`serial_scd`),
  CONSTRAINT `fk_relationship_290` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `attendance`
--

LOCK TABLES `attendance` WRITE;
/*!40000 ALTER TABLE `attendance` DISABLE KEYS */;
/*!40000 ALTER TABLE `attendance` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `author`
--

DROP TABLE IF EXISTS `author`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `author` (
  `serial_atr` int(11) NOT NULL AUTO_INCREMENT,
  `code_atr` varchar(20) NOT NULL,
  `name_atr` varchar(512) NOT NULL,
  `status_atr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_atr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `author`
--

LOCK TABLES `author` WRITE;
/*!40000 ALTER TABLE `author` DISABLE KEYS */;
/*!40000 ALTER TABLE `author` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `authority`
--

DROP TABLE IF EXISTS `authority`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `authority` (
  `serial_aut` int(11) NOT NULL AUTO_INCREMENT,
  `serial_atc` int(11) DEFAULT NULL,
  `id_aut` varchar(15) NOT NULL,
  `degree_aut` varchar(50) NOT NULL,
  `first_name_aut` varchar(100) NOT NULL,
  `last_name_aut` varchar(100) NOT NULL,
  `in_charge_aut` enum('YES','NO') NOT NULL,
  PRIMARY KEY (`serial_aut`),
  KEY `fk_has_charge` (`serial_atc`),
  CONSTRAINT `fk_has_charge` FOREIGN KEY (`serial_atc`) REFERENCES `authority_charge` (`serial_atc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `authority`
--

LOCK TABLES `authority` WRITE;
/*!40000 ALTER TABLE `authority` DISABLE KEYS */;
/*!40000 ALTER TABLE `authority` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `authority_charge`
--

DROP TABLE IF EXISTS `authority_charge`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `authority_charge` (
  `serial_atc` int(11) NOT NULL AUTO_INCREMENT,
  `name_atc` varchar(100) NOT NULL,
  `description_atc` text,
  `status_atc` enum('ACTIVE','INACTIVE') NOT NULL,
  PRIMARY KEY (`serial_atc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `authority_charge`
--

LOCK TABLES `authority_charge` WRITE;
/*!40000 ALTER TABLE `authority_charge` DISABLE KEYS */;
/*!40000 ALTER TABLE `authority_charge` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `authorized_persons`
--

DROP TABLE IF EXISTS `authorized_persons`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `authorized_persons` (
  `serial_aup` int(11) NOT NULL AUTO_INCREMENT,
  `firstname` varchar(45) NOT NULL,
  `lastname` varchar(45) NOT NULL,
  `id_aup` varchar(13) NOT NULL,
  `relationship` varchar(45) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `path_photo` varchar(250) DEFAULT NULL,
  PRIMARY KEY (`serial_aup`),
  KEY `fk_authorized_persons_student1_idx` (`serial_std`),
  CONSTRAINT `fk_authorized_persons_student1` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `authorized_persons`
--

LOCK TABLES `authorized_persons` WRITE;
/*!40000 ALTER TABLE `authorized_persons` DISABLE KEYS */;
/*!40000 ALTER TABLE `authorized_persons` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `autoschedule_process`
--

DROP TABLE IF EXISTS `autoschedule_process`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `autoschedule_process` (
  `serial_asp` int(11) NOT NULL AUTO_INCREMENT,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `date_asp` timestamp NULL DEFAULT NULL,
  `status_asp` enum('PENDING','PROGRESS','DONE') NOT NULL DEFAULT 'PENDING',
  `desired_opt_asp` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`serial_asp`),
  KEY `fk_relationship_293` (`serial_usr`),
  KEY `fk_relationship_294` (`serial_scy`),
  CONSTRAINT `fk_relationship_293` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_294` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `autoschedule_process`
--

LOCK TABLES `autoschedule_process` WRITE;
/*!40000 ALTER TABLE `autoschedule_process` DISABLE KEYS */;
/*!40000 ALTER TABLE `autoschedule_process` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `autoschedule_process_results`
--

DROP TABLE IF EXISTS `autoschedule_process_results`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `autoschedule_process_results` (
  `serial_asr` int(11) NOT NULL AUTO_INCREMENT,
  `serial_emp` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  `serial_cdt` int(11) DEFAULT NULL,
  `serial_asp` int(11) DEFAULT NULL,
  `serial_clr` int(11) DEFAULT NULL,
  `serial_lop` int(11) DEFAULT NULL,
  `option_asr` int(11) NOT NULL,
  `day_asr` enum('MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY','SUNDAY') NOT NULL,
  PRIMARY KEY (`serial_asr`),
  KEY `fk_relationship_295` (`serial_asp`),
  KEY `fk_relationship_296` (`serial_lop`),
  KEY `fk_relationship_297` (`serial_sbc`),
  KEY `fk_relationship_298` (`serial_clr`),
  KEY `fk_relationship_299` (`serial_crs`),
  KEY `fk_relationship_300` (`serial_emp`),
  KEY `fk_relationship_301` (`serial_cdt`),
  CONSTRAINT `fk_relationship_295` FOREIGN KEY (`serial_asp`) REFERENCES `autoschedule_process` (`serial_asp`),
  CONSTRAINT `fk_relationship_296` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`),
  CONSTRAINT `fk_relationship_297` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_298` FOREIGN KEY (`serial_clr`) REFERENCES `classroom` (`serial_clr`),
  CONSTRAINT `fk_relationship_299` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`),
  CONSTRAINT `fk_relationship_300` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`),
  CONSTRAINT `fk_relationship_301` FOREIGN KEY (`serial_cdt`) REFERENCES `credits_detail` (`serial_cdt`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `autoschedule_process_results`
--

LOCK TABLES `autoschedule_process_results` WRITE;
/*!40000 ALTER TABLE `autoschedule_process_results` DISABLE KEYS */;
/*!40000 ALTER TABLE `autoschedule_process_results` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `block_content`
--

DROP TABLE IF EXISTS `block_content`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `block_content` (
  `serial_bct` int(11) NOT NULL AUTO_INCREMENT,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_sbp` int(11) DEFAULT NULL,
  `block_bct` text,
  `comment_bct` text,
  `status_bct` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_bct`),
  KEY `fk_block_content_serial_sbc` (`serial_sbc`),
  KEY `fk_block_content_serial_sbp` (`serial_sbp`),
  CONSTRAINT `fk_block_content_serial_sbc` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_block_content_serial_sbp` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `block_content`
--

LOCK TABLES `block_content` WRITE;
/*!40000 ALTER TABLE `block_content` DISABLE KEYS */;
/*!40000 ALTER TABLE `block_content` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `block_content_grade`
--

DROP TABLE IF EXISTS `block_content_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `block_content_grade` (
  `serial_bcg` int(11) NOT NULL AUTO_INCREMENT,
  `serial_bct` int(11) DEFAULT NULL,
  `serial_bcc` int(11) DEFAULT NULL,
  `status_bcg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_bcg`),
  KEY `fk_block_content_grade_serial_bct` (`serial_bct`),
  KEY `fk_block_content_grade_serial_bcc` (`serial_bcc`),
  CONSTRAINT `fk_block_content_grade_serial_bcc` FOREIGN KEY (`serial_bcc`) REFERENCES `block_content_grade_criteria` (`serial_bcc`),
  CONSTRAINT `fk_block_content_grade_serial_bct` FOREIGN KEY (`serial_bct`) REFERENCES `block_content` (`serial_bct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `block_content_grade`
--

LOCK TABLES `block_content_grade` WRITE;
/*!40000 ALTER TABLE `block_content_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `block_content_grade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `block_content_grade_criteria`
--

DROP TABLE IF EXISTS `block_content_grade_criteria`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `block_content_grade_criteria` (
  `serial_bcc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `grade_type_bcc` enum('FULFILLMENT','SCOPE') NOT NULL,
  `name_bcc` varchar(100) NOT NULL,
  `status_bcc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_bcc`),
  KEY `fk_block_content_serial_scy` (`serial_scy`),
  CONSTRAINT `fk_block_content_serial_scy` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `block_content_grade_criteria`
--

LOCK TABLES `block_content_grade_criteria` WRITE;
/*!40000 ALTER TABLE `block_content_grade_criteria` DISABLE KEYS */;
/*!40000 ALTER TABLE `block_content_grade_criteria` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `book`
--

DROP TABLE IF EXISTS `book`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `book` (
  `serial_bok` int(11) NOT NULL AUTO_INCREMENT,
  `serial_bct` int(11) DEFAULT NULL,
  `serial_lst` int(11) DEFAULT NULL,
  `classification_number_bok` varchar(15) DEFAULT NULL,
  `title_bok` varchar(1024) NOT NULL,
  `editorial_bok` varchar(256) DEFAULT NULL,
  `pages_bok` int(11) DEFAULT NULL,
  `publication_year_bok` int(11) DEFAULT NULL,
  `publication_place_bok` varchar(256) DEFAULT NULL,
  `volume_bok` int(11) DEFAULT NULL,
  PRIMARY KEY (`serial_bok`),
  KEY `fk_relationship_271` (`serial_bct`),
  KEY `fk_relationship_272` (`serial_lst`),
  CONSTRAINT `fk_relationship_271` FOREIGN KEY (`serial_bct`) REFERENCES `book_category` (`serial_bct`),
  CONSTRAINT `fk_relationship_272` FOREIGN KEY (`serial_lst`) REFERENCES `library_section` (`serial_lst`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `book`
--

LOCK TABLES `book` WRITE;
/*!40000 ALTER TABLE `book` DISABLE KEYS */;
/*!40000 ALTER TABLE `book` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `book_author`
--

DROP TABLE IF EXISTS `book_author`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `book_author` (
  `serial_atr` int(11) DEFAULT NULL,
  `serial_bok` int(11) DEFAULT NULL,
  `status_bka` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_273` (`serial_atr`),
  KEY `fk_relationship_274` (`serial_bok`),
  CONSTRAINT `fk_relationship_273` FOREIGN KEY (`serial_atr`) REFERENCES `author` (`serial_atr`),
  CONSTRAINT `fk_relationship_274` FOREIGN KEY (`serial_bok`) REFERENCES `book` (`serial_bok`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `book_author`
--

LOCK TABLES `book_author` WRITE;
/*!40000 ALTER TABLE `book_author` DISABLE KEYS */;
/*!40000 ALTER TABLE `book_author` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `book_category`
--

DROP TABLE IF EXISTS `book_category`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `book_category` (
  `serial_bct` int(11) NOT NULL AUTO_INCREMENT,
  `boo_serial_bct` int(11) DEFAULT NULL,
  `name_bct` varchar(256) NOT NULL,
  `status_bct` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_bct`),
  KEY `fk_relationship_270` (`boo_serial_bct`),
  CONSTRAINT `fk_relationship_270` FOREIGN KEY (`boo_serial_bct`) REFERENCES `book_category` (`serial_bct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `book_category`
--

LOCK TABLES `book_category` WRITE;
/*!40000 ALTER TABLE `book_category` DISABLE KEYS */;
/*!40000 ALTER TABLE `book_category` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `book_copy`
--

DROP TABLE IF EXISTS `book_copy`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `book_copy` (
  `serial_bkc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_bok` int(11) DEFAULT NULL,
  `copy_number_bkc` int(11) NOT NULL,
  `available_bkc` enum('YES','NO') NOT NULL DEFAULT 'YES',
  `partial_damage_value_bkc` decimal(10,0) DEFAULT NULL,
  `total_damage_value_bkc` decimal(10,0) DEFAULT NULL,
  `status_bkc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_bkc`),
  KEY `fk_relationship_275` (`serial_bok`),
  CONSTRAINT `fk_relationship_275` FOREIGN KEY (`serial_bok`) REFERENCES `book` (`serial_bok`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `book_copy`
--

LOCK TABLES `book_copy` WRITE;
/*!40000 ALTER TABLE `book_copy` DISABLE KEYS */;
/*!40000 ALTER TABLE `book_copy` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `bus`
--

DROP TABLE IF EXISTS `bus`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bus` (
  `serial_bus` int(11) NOT NULL AUTO_INCREMENT,
  `code_bus` varchar(35) NOT NULL,
  `plate_num_bus` varchar(12) NOT NULL,
  `description_bus` text NOT NULL,
  `capacity_bus` int(11) NOT NULL,
  `status_bus` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_bus`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `bus`
--

LOCK TABLES `bus` WRITE;
/*!40000 ALTER TABLE `bus` DISABLE KEYS */;
/*!40000 ALTER TABLE `bus` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `bus_driver`
--

DROP TABLE IF EXISTS `bus_driver`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bus_driver` (
  `serial_bdr` int(11) NOT NULL AUTO_INCREMENT,
  `id_bdr` varchar(13) NOT NULL,
  `first_name_bdr` varchar(512) NOT NULL,
  `last_name_bdr` varchar(512) NOT NULL,
  `mobile1_bdr` varchar(30) DEFAULT NULL,
  `mobile2_bdr` varchar(30) DEFAULT NULL,
  `phone1_bdr` varchar(30) NOT NULL,
  `phone2_bdr` varchar(30) DEFAULT NULL,
  `phone3_bdr` varchar(30) DEFAULT NULL,
  `address_bdr` text NOT NULL,
  `drive_license_bdr` varchar(20) DEFAULT NULL,
  `license_expire_date_bdr` date DEFAULT NULL,
  `is_companion_bdr` enum('YES','NO') DEFAULT 'NO',
  `status_bdr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_bdr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `bus_driver`
--

LOCK TABLES `bus_driver` WRITE;
/*!40000 ALTER TABLE `bus_driver` DISABLE KEYS */;
/*!40000 ALTER TABLE `bus_driver` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `bus_shift_year`
--

DROP TABLE IF EXISTS `bus_shift_year`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bus_shift_year` (
  `serial_bdr` int(11) NOT NULL,
  `serial_rot` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_bus` int(11) NOT NULL,
  `serial_sft` int(11) NOT NULL,
  `bus_serial_bdr` int(11) DEFAULT NULL,
  `bus_buddy_bdr` int(11) DEFAULT NULL COMMENT ' /* comment truncated */ /*Driver companion.*/',
  `status_bpy` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_rot`,`serial_scy`,`serial_bus`,`serial_sft`),
  KEY `fk_relationship_76` (`serial_scy`),
  KEY `fk_relationship_77` (`serial_bdr`),
  KEY `fk_relationship_78` (`serial_bus`),
  KEY `fk_relationship_80` (`serial_sft`),
  KEY `fk_relationship_81` (`bus_serial_bdr`),
  KEY `fk_relationship_82_idx` (`bus_buddy_bdr`),
  CONSTRAINT `fk_bus_shift_year_bus_driver` FOREIGN KEY (`bus_buddy_bdr`) REFERENCES `bus_driver` (`serial_bdr`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_76` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`),
  CONSTRAINT `fk_relationship_77` FOREIGN KEY (`serial_bdr`) REFERENCES `bus_driver` (`serial_bdr`),
  CONSTRAINT `fk_relationship_78` FOREIGN KEY (`serial_bus`) REFERENCES `bus` (`serial_bus`),
  CONSTRAINT `fk_relationship_79` FOREIGN KEY (`serial_rot`) REFERENCES `route` (`serial_rot`),
  CONSTRAINT `fk_relationship_80` FOREIGN KEY (`serial_sft`) REFERENCES `shift` (`serial_sft`),
  CONSTRAINT `fk_relationship_81` FOREIGN KEY (`bus_serial_bdr`) REFERENCES `bus_driver` (`serial_bdr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `bus_shift_year`
--

LOCK TABLES `bus_shift_year` WRITE;
/*!40000 ALTER TABLE `bus_shift_year` DISABLE KEYS */;
/*!40000 ALTER TABLE `bus_shift_year` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `bus_year_user`
--

DROP TABLE IF EXISTS `bus_year_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bus_year_user` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_rot` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_bus` int(11) DEFAULT NULL,
  `serial_sft` int(11) DEFAULT NULL,
  `type_address_byu` enum('HOME','OTHER') NOT NULL,
  `main_street_byu` varchar(64) NOT NULL,
  `number_byu` varchar(32) DEFAULT NULL,
  `secondary_street_byu` varchar(64) DEFAULT NULL,
  `status_byu` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_97` (`serial_rot`,`serial_scy`,`serial_bus`,`serial_sft`),
  KEY `fk_relationship_98` (`serial_usr`),
  CONSTRAINT `fk_relationship_97` FOREIGN KEY (`serial_rot`, `serial_scy`, `serial_bus`, `serial_sft`) REFERENCES `bus_shift_year` (`serial_rot`, `serial_scy`, `serial_bus`, `serial_sft`),
  CONSTRAINT `fk_relationship_98` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `bus_year_user`
--

LOCK TABLES `bus_year_user` WRITE;
/*!40000 ALTER TABLE `bus_year_user` DISABLE KEYS */;
/*!40000 ALTER TABLE `bus_year_user` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cat_lunch_employee`
--

DROP TABLE IF EXISTS `cat_lunch_employee`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cat_lunch_employee` (
  `serial_cle` int(11) NOT NULL AUTO_INCREMENT,
  `name_cle` text NOT NULL,
  `description_cle` text NOT NULL,
  `total_cle` decimal(10,2) NOT NULL,
  `status_cle` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_cle`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cat_lunch_employee`
--

LOCK TABLES `cat_lunch_employee` WRITE;
/*!40000 ALTER TABLE `cat_lunch_employee` DISABLE KEYS */;
/*!40000 ALTER TABLE `cat_lunch_employee` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cat_lunch_type`
--

DROP TABLE IF EXISTS `cat_lunch_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cat_lunch_type` (
  `serial_clt` int(11) NOT NULL AUTO_INCREMENT,
  `name_clt` text NOT NULL,
  `description_clt` text NOT NULL,
  `status_clt` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_clt`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cat_lunch_type`
--

LOCK TABLES `cat_lunch_type` WRITE;
/*!40000 ALTER TABLE `cat_lunch_type` DISABLE KEYS */;
/*!40000 ALTER TABLE `cat_lunch_type` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cat_period`
--

DROP TABLE IF EXISTS `cat_period`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cat_period` (
  `serial_cpd` int(11) NOT NULL AUTO_INCREMENT,
  `name_cpd` varchar(100) NOT NULL,
  `description_cpd` text,
  `status_cpd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_cpd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cat_period`
--

LOCK TABLES `cat_period` WRITE;
/*!40000 ALTER TABLE `cat_period` DISABLE KEYS */;
/*!40000 ALTER TABLE `cat_period` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cat_subject`
--

DROP TABLE IF EXISTS `cat_subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cat_subject` (
  `serial_csb` int(11) NOT NULL AUTO_INCREMENT,
  `cat_serial_csb` int(11) DEFAULT NULL,
  `serial_aca` int(11) DEFAULT NULL,
  `serial_lng` int(11) DEFAULT NULL,
  `code_csb` varchar(20) NOT NULL,
  `name_csb` varchar(255) NOT NULL,
  `status_csb` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_csb`),
  KEY `fk_child_parent` (`cat_serial_csb`),
  KEY `fk_relationship_62` (`serial_aca`),
  KEY `fk_relationship_68` (`serial_lng`),
  CONSTRAINT `fk_child_parent` FOREIGN KEY (`cat_serial_csb`) REFERENCES `cat_subject` (`serial_csb`),
  CONSTRAINT `fk_relationship_62` FOREIGN KEY (`serial_aca`) REFERENCES `academic_area` (`serial_aca`),
  CONSTRAINT `fk_relationship_68` FOREIGN KEY (`serial_lng`) REFERENCES `language` (`serial_lng`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cat_subject`
--

LOCK TABLES `cat_subject` WRITE;
/*!40000 ALTER TABLE `cat_subject` DISABLE KEYS */;
/*!40000 ALTER TABLE `cat_subject` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `change_reason`
--

DROP TABLE IF EXISTS `change_reason`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `change_reason` (
  `serial_chr` int(11) NOT NULL AUTO_INCREMENT,
  `name_chr` varchar(256) NOT NULL,
  `type_chr` enum('DISCIPLINE','ACTIVITY','BOTH') NOT NULL DEFAULT 'BOTH',
  `status_chr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_chr`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `change_reason`
--

LOCK TABLES `change_reason` WRITE;
/*!40000 ALTER TABLE `change_reason` DISABLE KEYS */;
INSERT INTO `change_reason` VALUES (1,'Exclusión de Actividad','ACTIVITY','ACTIVE'),(2,'RESOLUCION DE JUNTA','BOTH','ACTIVE'),(3,'ERROR DE DIGITACION','BOTH','ACTIVE'),(4,'INGRESO DE NOTA ATRASADA X AUSENCIA DEL ALUMNO','BOTH','ACTIVE');
/*!40000 ALTER TABLE `change_reason` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `class_group`
--

DROP TABLE IF EXISTS `class_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `class_group` (
  `serial_clg` int(11) NOT NULL AUTO_INCREMENT,
  `name_clg` varchar(150) NOT NULL,
  `description_clg` text,
  `status_clg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_clg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `class_group`
--

LOCK TABLES `class_group` WRITE;
/*!40000 ALTER TABLE `class_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `class_group` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `class_group_ministry_equivalence`
--

DROP TABLE IF EXISTS `class_group_ministry_equivalence`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `class_group_ministry_equivalence` (
  `serial_clgme` int(11) NOT NULL,
  `name_clgme` varchar(45) NOT NULL,
  `description_clgme` text,
  `status_clgme` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_clgme`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `class_group_ministry_equivalence`
--

LOCK TABLES `class_group_ministry_equivalence` WRITE;
/*!40000 ALTER TABLE `class_group_ministry_equivalence` DISABLE KEYS */;
/*!40000 ALTER TABLE `class_group_ministry_equivalence` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `classroom`
--

DROP TABLE IF EXISTS `classroom`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `classroom` (
  `serial_clr` int(11) NOT NULL AUTO_INCREMENT,
  `name_clr` varchar(80) NOT NULL,
  `capacity_clr` int(11) NOT NULL,
  `description_clr` text NOT NULL,
  `status_clr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_clr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `classroom`
--

LOCK TABLES `classroom` WRITE;
/*!40000 ALTER TABLE `classroom` DISABLE KEYS */;
/*!40000 ALTER TABLE `classroom` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `committe`
--

DROP TABLE IF EXISTS `committe`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `committe` (
  `serial_cmt` int(11) NOT NULL AUTO_INCREMENT,
  `serial_asstu` int(11) DEFAULT NULL,
  `report_cmt` int(11) DEFAULT NULL,
  `inset_date_cmt` date DEFAULT NULL,
  `modify_date_cmt` date DEFAULT NULL,
  PRIMARY KEY (`serial_cmt`),
  KEY `serial_asstu5_idx` (`serial_asstu`),
  CONSTRAINT `serial_asstu5` FOREIGN KEY (`serial_asstu`) REFERENCES `aspirant_student` (`serial_asstu`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `committe`
--

LOCK TABLES `committe` WRITE;
/*!40000 ALTER TABLE `committe` DISABLE KEYS */;
/*!40000 ALTER TABLE `committe` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `counties`
--

DROP TABLE IF EXISTS `counties`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `counties` (
  `serial_cnt` int(11) NOT NULL AUTO_INCREMENT COMMENT 'clave primaria de la tabla cantón, auto incremental',
  `serial_ste` int(11) NOT NULL COMMENT 'clave primaria de la tabla provincia',
  `name_cnt` varchar(64) NOT NULL COMMENT 'nombre del cantón',
  `status_cnt` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE' COMMENT 'campo que define si el cantón está activo o inactivo',
  PRIMARY KEY (`serial_cnt`),
  KEY `FK_state_has_counties` (`serial_ste`),
  CONSTRAINT `FK_state_has_counties` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`)
) ENGINE=InnoDB AUTO_INCREMENT=221 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `counties`
--

LOCK TABLES `counties` WRITE;
/*!40000 ALTER TABLE `counties` DISABLE KEYS */;
INSERT INTO `counties` VALUES (1,1,'Cuenca','ACTIVE'),(2,1,'Chordeleg','ACTIVE'),(3,1,'El Pan','ACTIVE'),(4,1,'Girón','ACTIVE'),(5,1,'Guachapala','ACTIVE'),(6,1,'Gualaceo','ACTIVE'),(7,1,'Nabón','ACTIVE'),(8,1,'Oña','ACTIVE'),(9,1,'Paute','ACTIVE'),(10,1,'Camilo Ponce Enríquez','ACTIVE'),(11,1,'Pucará','ACTIVE'),(12,1,'San Fernando','ACTIVE'),(13,1,'Santa Isabel','ACTIVE'),(14,1,'Sevilla de Oro','ACTIVE'),(15,1,'Sígsig','ACTIVE'),(16,2,'Caluma','ACTIVE'),(17,2,'Chillanes','ACTIVE'),(18,2,'Chimbo','ACTIVE'),(19,2,'Echeandía','ACTIVE'),(20,2,'Guaranda','ACTIVE'),(21,2,'Las Naves','ACTIVE'),(22,2,'San Miguel','ACTIVE'),(23,3,'Azogues','ACTIVE'),(24,3,'Biblián','ACTIVE'),(25,3,'Cañar','ACTIVE'),(26,3,'Déleg','ACTIVE'),(27,3,'El Tambo','ACTIVE'),(28,3,'La Troncal','ACTIVE'),(29,3,'Suscal','ACTIVE'),(30,4,'Bolívar','ACTIVE'),(31,4,'Espejo','ACTIVE'),(32,4,'Mira','ACTIVE'),(33,4,'Montúfar','ACTIVE'),(34,4,'San Pedro de Huaca','ACTIVE'),(35,4,'Tulcán','ACTIVE'),(36,5,'Alausí','ACTIVE'),(37,5,'Chambo','ACTIVE'),(38,5,'Chunchi','ACTIVE'),(39,5,'Colta','ACTIVE'),(40,5,'Cumandá','ACTIVE'),(41,5,'Guamote','ACTIVE'),(42,5,'Guano','ACTIVE'),(43,5,'Pallatanga','ACTIVE'),(44,5,'Penipe','ACTIVE'),(45,5,'Riobamba','ACTIVE'),(46,6,'La Maná','ACTIVE'),(47,6,'Latacunga','ACTIVE'),(48,6,'Pangua','ACTIVE'),(49,6,'Pujilí','ACTIVE'),(50,6,'Salcedo','ACTIVE'),(51,6,'Saquisilí','ACTIVE'),(52,6,'Sigchos','ACTIVE'),(53,7,' Arenillas','ACTIVE'),(54,7,' Atahualpa','ACTIVE'),(55,7,'Balsas','ACTIVE'),(56,7,'Chilla','ACTIVE'),(57,7,'El Guabo','ACTIVE'),(58,7,'Huaquillas','ACTIVE'),(59,7,'Las Lajas','ACTIVE'),(60,7,' Machala','ACTIVE'),(61,7,'Marcabelí','ACTIVE'),(62,7,'Pasaje','ACTIVE'),(63,7,' Piñas','ACTIVE'),(64,7,' Portovelo','ACTIVE'),(65,7,'Santa Rosa','ACTIVE'),(66,7,' Zaruma','ACTIVE'),(67,8,'Atacames','ACTIVE'),(68,8,'Cantón Eloy Alfaro (Limones)','ACTIVE'),(69,8,'Esmeraldas','ACTIVE'),(70,8,'Muisne','ACTIVE'),(71,8,'Quinindé','ACTIVE'),(72,8,'Río Verde','ACTIVE'),(73,8,'San Lorenzo','ACTIVE'),(74,9,'Isabela','ACTIVE'),(75,9,'San Cristóbal','ACTIVE'),(76,9,'Santa Cruz','ACTIVE'),(77,10,' Guayaquil','ACTIVE'),(78,10,' Alfredo Baquerizo','ACTIVE'),(79,10,' Balao','ACTIVE'),(80,10,' Balzar','ACTIVE'),(81,10,' Daule','ACTIVE'),(82,10,' Durán','ACTIVE'),(83,10,' El Empalme','ACTIVE'),(84,10,' El Triunfo','ACTIVE'),(85,10,' Milagro','ACTIVE'),(86,10,' Naranjal','ACTIVE'),(87,10,' Naranjito','ACTIVE'),(88,10,' Palestina','ACTIVE'),(89,10,' Pedro Carbo','ACTIVE'),(90,10,' Samborondón','ACTIVE'),(91,10,' Santa Lucía','ACTIVE'),(92,10,' Salitre','ACTIVE'),(93,10,' Yaguachi','ACTIVE'),(94,10,' Playas','ACTIVE'),(95,10,' Simón Bolívar','ACTIVE'),(96,10,' Marcelino Maridueña','ACTIVE'),(97,10,' Nobol','ACTIVE'),(98,10,' Lomas de Sargentillo','ACTIVE'),(99,10,' Antonio Elizalde','ACTIVE'),(100,10,' Isidro Ayora','ACTIVE'),(101,11,'Antonio Ante','ACTIVE'),(102,11,'Cotacachi','ACTIVE'),(103,11,'Ibarra','ACTIVE'),(104,11,'Otavalo','ACTIVE'),(105,11,'Pimampiro','ACTIVE'),(106,11,'San Miguel de Urcuquí','ACTIVE'),(107,12,'Calvas','ACTIVE'),(108,12,'Catamayo','ACTIVE'),(109,12,'Celica','ACTIVE'),(110,12,'Chaguarpamba','ACTIVE'),(111,12,'Espíndola','ACTIVE'),(112,12,'Gonzanamá','ACTIVE'),(113,12,'Loja','ACTIVE'),(114,12,'Macará','ACTIVE'),(115,12,'Olmedo','ACTIVE'),(116,12,'Paltas','ACTIVE'),(117,12,'Pindal','ACTIVE'),(118,12,'Puyango','ACTIVE'),(119,12,'Quilanga','ACTIVE'),(120,12,'Saraguro','ACTIVE'),(121,12,'Sozoranga','ACTIVE'),(122,12,'Zapotillo','ACTIVE'),(123,13,'Baba','ACTIVE'),(124,13,'Babahoyo','ACTIVE'),(125,13,'Buena Fe','ACTIVE'),(126,13,'Mocache','ACTIVE'),(127,13,'Montalvo','ACTIVE'),(128,13,'Palenque','ACTIVE'),(129,13,'Pueblo Viejo','ACTIVE'),(130,13,'Quevedo','ACTIVE'),(131,13,'Quinsaloma','ACTIVE'),(132,13,'Urdaneta','ACTIVE'),(133,13,'Ventanas','ACTIVE'),(134,13,'Vinces','ACTIVE'),(135,13,'Valencia','ACTIVE'),(136,14,'Bolívar','ACTIVE'),(137,14,'Chone','ACTIVE'),(138,14,'El Carmen','ACTIVE'),(139,14,'Flavio Alfaro','ACTIVE'),(140,14,'Jama','ACTIVE'),(141,14,'Jaramijó','ACTIVE'),(142,14,'Jipijapa','ACTIVE'),(143,14,'Junín ','ACTIVE'),(144,14,'Manta','ACTIVE'),(145,14,'Montecristi','ACTIVE'),(146,14,'Olmedo','ACTIVE'),(147,14,'Paján','ACTIVE'),(148,14,'Pedernales','ACTIVE'),(149,14,'Pichincha','ACTIVE'),(150,14,'Portoviejo','ACTIVE'),(151,14,'Puerto Lopéz','ACTIVE'),(152,14,'Rocafuerte','ACTIVE'),(153,14,'San Vicente','ACTIVE'),(154,14,'Santa Ana','ACTIVE'),(155,14,'Sucre','ACTIVE'),(156,14,'Tosagua','ACTIVE'),(157,14,'Veinticuatro de Mayo','ACTIVE'),(158,15,'Gualaquiza','ACTIVE'),(159,15,'Huamboya ','ACTIVE'),(160,15,'Limón Indanza','ACTIVE'),(161,15,'Logroño ','ACTIVE'),(162,15,'Morona','ACTIVE'),(163,15,'Pablo Sexto ','ACTIVE'),(164,15,'Palora ','ACTIVE'),(165,15,'San Juan Bosco','ACTIVE'),(166,15,'Santiago','ACTIVE'),(167,15,'Sucúa','ACTIVE'),(168,15,'Taisha ','ACTIVE'),(169,15,'Tiwintza ','ACTIVE'),(170,16,'Archidona','ACTIVE'),(171,16,'Carlos Julio Arosemena Tola','ACTIVE'),(172,16,'El Chaco','ACTIVE'),(173,16,'Quijos','ACTIVE'),(174,16,'Tena','ACTIVE'),(175,17,'Aguarico','ACTIVE'),(176,17,'Francisco de Orellana','ACTIVE'),(177,17,'Joya de los Sachas','ACTIVE'),(178,17,'Loreto','ACTIVE'),(179,18,'Arajuno','ACTIVE'),(180,18,'Mera','ACTIVE'),(181,18,'Pastaza','ACTIVE'),(182,18,'Santa Clara','ACTIVE'),(183,19,'Cayambe','ACTIVE'),(184,19,'Mejía','ACTIVE'),(185,19,'Pedro Moncayo','ACTIVE'),(186,19,'Pedro Vicente Maldonado','ACTIVE'),(187,19,'Puerto Quito','ACTIVE'),(188,19,'Distrito Metropolitano de Quito','ACTIVE'),(189,19,'Rumiñahui','ACTIVE'),(190,19,'San Miguel de Los Bancos','ACTIVE'),(191,20,'La Libertad','ACTIVE'),(192,20,'Salinas','ACTIVE'),(193,20,'Santa Elena','ACTIVE'),(194,21,'Santo Domingo','ACTIVE'),(195,21,'La Concordia','ACTIVE'),(196,22,'Cascales','ACTIVE'),(197,22,'Cuyabeno','ACTIVE'),(198,22,'Gonzalo Pizarro','ACTIVE'),(199,22,'Lago Agrio','ACTIVE'),(200,22,'Putumayo','ACTIVE'),(201,22,'Shushufindi','ACTIVE'),(202,22,'Sucumbios','ACTIVE'),(203,23,'Ambato','ACTIVE'),(204,23,'Baños','ACTIVE'),(205,23,'Cevallos','ACTIVE'),(206,23,'Mocha','ACTIVE'),(207,23,'Patate','ACTIVE'),(208,23,'Pelileo','ACTIVE'),(209,23,'Píllaro','ACTIVE'),(210,23,'Quero','ACTIVE'),(211,23,'Tisaleo','ACTIVE'),(212,24,'Centinela del Cóndor','ACTIVE'),(213,24,'Chinchipe','ACTIVE'),(214,24,'El Pangui','ACTIVE'),(215,24,'Nangaritza','ACTIVE'),(216,24,'Palanda','ACTIVE'),(217,24,'Paquisha','ACTIVE'),(218,24,'Yacuambi','ACTIVE'),(219,24,'Yantzaza','ACTIVE'),(220,24,'Zamora','ACTIVE');
/*!40000 ALTER TABLE `counties` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `country`
--

DROP TABLE IF EXISTS `country`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `country` (
  `serial_cou` int(11) NOT NULL AUTO_INCREMENT,
  `name_cou` varchar(100) DEFAULT NULL,
  `status_cou` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_cou`)
) ENGINE=InnoDB AUTO_INCREMENT=233 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `country`
--

LOCK TABLES `country` WRITE;
/*!40000 ALTER TABLE `country` DISABLE KEYS */;
INSERT INTO `country` VALUES (1,'Andorra','ACTIVE'),(2,'United arab emirates','ACTIVE'),(3,'Afghanistan','ACTIVE'),(4,'Antigua and barbuda','ACTIVE'),(5,'Anguilla','ACTIVE'),(6,'Albania','ACTIVE'),(7,'Armenia','ACTIVE'),(8,'Netherlands antilles','ACTIVE'),(9,'Angola','ACTIVE'),(10,'Antarctica','ACTIVE'),(11,'Argentina','ACTIVE'),(12,'Americansamoa','ACTIVE'),(13,'Austria','ACTIVE'),(14,'Australia','ACTIVE'),(15,'Aruba','ACTIVE'),(16,'Azerbaijan','ACTIVE'),(17,'Bosnia and herzegovina','ACTIVE'),(18,'Barbados','ACTIVE'),(19,'Bangladesh','ACTIVE'),(20,'Belgium','ACTIVE'),(21,'Burkinafaso','ACTIVE'),(22,'Bulgaria','ACTIVE'),(23,'Bahrain','ACTIVE'),(24,'Burundi','ACTIVE'),(25,'Benin','ACTIVE'),(26,'Bermuda','ACTIVE'),(27,'Bruneida russalam','ACTIVE'),(28,'Bolivia','ACTIVE'),(29,'Brazil','ACTIVE'),(30,'Bahamas','ACTIVE'),(31,'Bhutan','ACTIVE'),(32,'Bouvetisland','ACTIVE'),(33,'Botswana','ACTIVE'),(34,'Belarus','ACTIVE'),(35,'Belize','ACTIVE'),(36,'Canada','ACTIVE'),(37,'Cocos(keeling)islands','ACTIVE'),(38,'Congo','ACTIVE'),(39,'Central african republic','ACTIVE'),(40,'Congo','ACTIVE'),(41,'Switzerland','ACTIVE'),(42,'Coted\'ivoire','ACTIVE'),(43,'Cookislands','ACTIVE'),(44,'Chile','ACTIVE'),(45,'Cameroon','ACTIVE'),(46,'China','ACTIVE'),(47,'Colombia','ACTIVE'),(48,'Costarica','ACTIVE'),(49,'Serbia and montenegro','ACTIVE'),(50,'Cuba','ACTIVE'),(51,'Capeverde','ACTIVE'),(52,'Christmas island','ACTIVE'),(53,'Cyprus','ACTIVE'),(54,'Czech republic','ACTIVE'),(55,'Germany','ACTIVE'),(56,'Djibouti','ACTIVE'),(57,'Denmark','ACTIVE'),(58,'Dominica','ACTIVE'),(59,'Dominican republic','ACTIVE'),(60,'Algeria','ACTIVE'),(61,'Ecuador','ACTIVE'),(62,'Estonia','ACTIVE'),(63,'Egypt','ACTIVE'),(64,'Western sahara','ACTIVE'),(65,'Eritrea','ACTIVE'),(66,'Spain','ACTIVE'),(67,'Ethiopia','ACTIVE'),(68,'Finland','ACTIVE'),(69,'Fiji','ACTIVE'),(70,'Micronesia','ACTIVE'),(71,'Faroe islands','ACTIVE'),(72,'France','ACTIVE'),(73,'Gabon','ACTIVE'),(74,'United kingdom','ACTIVE'),(75,'Grenada','ACTIVE'),(76,'Georgia','ACTIVE'),(77,'French guiana','ACTIVE'),(78,'Ghana','ACTIVE'),(79,'Gibraltar','ACTIVE'),(80,'Greenland','ACTIVE'),(81,'Gambia','ACTIVE'),(82,'Guinea','ACTIVE'),(83,'Guadeloupe','ACTIVE'),(84,'Equatorial guinea','ACTIVE'),(85,'Greece','ACTIVE'),(86,'Guatemala','ACTIVE'),(87,'Guam','ACTIVE'),(88,'Guinea-bissau','ACTIVE'),(89,'Guyana','ACTIVE'),(90,'Hong kong','ACTIVE'),(91,'Honduras','ACTIVE'),(92,'Croatia','ACTIVE'),(93,'Haiti','ACTIVE'),(94,'Hungary','ACTIVE'),(95,'Indonesia','ACTIVE'),(96,'Ireland','ACTIVE'),(97,'Israel','ACTIVE'),(98,'India','ACTIVE'),(99,'Iraq','ACTIVE'),(100,'Iran,islamic republic of','ACTIVE'),(101,'Iceland','ACTIVE'),(102,'Italy','ACTIVE'),(103,'Jamaica','ACTIVE'),(104,'Jordan','ACTIVE'),(105,'Japan','ACTIVE'),(106,'Kenya','ACTIVE'),(107,'Kyrgyzstan','ACTIVE'),(108,'Cambodia','ACTIVE'),(109,'Kiribati','ACTIVE'),(110,'Comoros','ACTIVE'),(111,'Saint kitts and nevis','ACTIVE'),(112,'Korea','ACTIVE'),(113,'Korea,republic of','ACTIVE'),(114,'Kuwait','ACTIVE'),(115,'Cayman islands','ACTIVE'),(116,'Kazakhstan','ACTIVE'),(117,'Lao','ACTIVE'),(118,'Lebanon','ACTIVE'),(119,'Saint lucia','ACTIVE'),(120,'Liechtenstein','ACTIVE'),(121,'Srilanka','ACTIVE'),(122,'Liberia','ACTIVE'),(123,'Lesotho','ACTIVE'),(124,'Lithuania','ACTIVE'),(125,'Luxembourg','ACTIVE'),(126,'Latvia','ACTIVE'),(127,'Libyanarabjamahiriya','ACTIVE'),(128,'Morocco','ACTIVE'),(129,'Monaco','ACTIVE'),(130,'Moldova,republic of','ACTIVE'),(131,'Madagascar','ACTIVE'),(132,'Marshall islands','ACTIVE'),(133,'Macedonia','ACTIVE'),(134,'Mali','ACTIVE'),(135,'Myanmar','ACTIVE'),(136,'Mongolia','ACTIVE'),(137,'Macao','ACTIVE'),(138,'Northern mariana islands','ACTIVE'),(139,'Martinique','ACTIVE'),(140,'Mauritania','ACTIVE'),(141,'Montserrat','ACTIVE'),(142,'Malta','ACTIVE'),(143,'Mauritius','ACTIVE'),(144,'Maldives','ACTIVE'),(145,'Malawi','ACTIVE'),(146,'Mexico','ACTIVE'),(147,'Malaysia','ACTIVE'),(148,'Mozambique','ACTIVE'),(149,'Namibia','ACTIVE'),(150,'New caledonia','ACTIVE'),(151,'Niger','ACTIVE'),(152,'Norfolk island','ACTIVE'),(153,'Nigeria','ACTIVE'),(154,'Nicaragua','ACTIVE'),(155,'Netherlands','ACTIVE'),(156,'Norway','ACTIVE'),(157,'Nepal','ACTIVE'),(158,'Nauru','ACTIVE'),(159,'Niue','ACTIVE'),(160,'New zealand','ACTIVE'),(161,'Oman','ACTIVE'),(162,'Panama','ACTIVE'),(163,'Peru','ACTIVE'),(164,'French polynesia','ACTIVE'),(165,'Papua new guinea','ACTIVE'),(166,'Philippines','ACTIVE'),(167,'Pakistan','ACTIVE'),(168,'Poland','ACTIVE'),(169,'Saint pierre and miquelon','ACTIVE'),(170,'Pitcairn','ACTIVE'),(171,'Puerto rico','ACTIVE'),(172,'Palestina','ACTIVE'),(173,'Portugal','ACTIVE'),(174,'Palau','ACTIVE'),(175,'Paraguay','ACTIVE'),(176,'Qatar','ACTIVE'),(177,'Reunion','ACTIVE'),(178,'Romania','ACTIVE'),(179,'Russian federation','ACTIVE'),(180,'Rwanda','ACTIVE'),(181,'Saudi arabia','ACTIVE'),(182,'Solomon islands','ACTIVE'),(183,'Seychelles','ACTIVE'),(184,'Sudan','ACTIVE'),(185,'Sweden','ACTIVE'),(186,'Singapore','ACTIVE'),(187,'Saint helena','ACTIVE'),(188,'Slovenia','ACTIVE'),(189,'Svalbard and janmayen','ACTIVE'),(190,'Slovakia','ACTIVE'),(191,'Sierra leone','ACTIVE'),(192,'San marino','ACTIVE'),(193,'Senegal','ACTIVE'),(194,'Somalia','ACTIVE'),(195,'Suriname','ACTIVE'),(196,'Saotome and principe','ACTIVE'),(197,'El salvador','ACTIVE'),(198,'Syrian arab republic','ACTIVE'),(199,'Swaziland','ACTIVE'),(200,'Turks and caicos islands','ACTIVE'),(201,'Chad','ACTIVE'),(202,'Togo','ACTIVE'),(203,'Thailand','ACTIVE'),(204,'Tajikistan','ACTIVE'),(205,'Tokelau','ACTIVE'),(206,'Timor-leste','ACTIVE'),(207,'Turkmenistan','ACTIVE'),(208,'Tunisia','ACTIVE'),(209,'Tonga','ACTIVE'),(210,'Turkey','ACTIVE'),(211,'Trinidad and tobago','ACTIVE'),(212,'Tuvalu','ACTIVE'),(213,'Taiwan,province of china','ACTIVE'),(214,'Tanzania,united republic of','ACTIVE'),(215,'Ukraine','ACTIVE'),(216,'Uganda','ACTIVE'),(217,'United states','ACTIVE'),(218,'Uruguay','ACTIVE'),(219,'Uzbekistan','ACTIVE'),(220,'Holysee(vatican city state)','ACTIVE'),(221,'Venezuela','ACTIVE'),(222,'Virgin islands,british','ACTIVE'),(223,'Virgin islands,u.s.','ACTIVE'),(224,'Vietnam','ACTIVE'),(225,'Vanuatu','ACTIVE'),(226,'Wallis and futuna','ACTIVE'),(227,'Samoa','ACTIVE'),(228,'Yemen','ACTIVE'),(229,'Mayotte','ACTIVE'),(230,'South africa','ACTIVE'),(231,'Zambia','ACTIVE'),(232,'Zimbabwe','ACTIVE');
/*!40000 ALTER TABLE `country` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `course`
--

DROP TABLE IF EXISTS `course`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `course` (
  `serial_crs` int(11) NOT NULL AUTO_INCREMENT,
  `serial_clg` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `serial_clgme` int(11) DEFAULT NULL,
  `attendance_crs` enum('DAY','CLASS') NOT NULL DEFAULT 'DAY',
  `status_crs` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_crs`),
  KEY `fk_selected_class` (`serial_clg`),
  KEY `fk_selected_level_speciality` (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_selected_class_ministry_equivalence_idx` (`serial_clgme`),
  CONSTRAINT `fk_selected_class` FOREIGN KEY (`serial_clg`) REFERENCES `class_group` (`serial_clg`),
  CONSTRAINT `fk_selected_class_ministry_equivalence` FOREIGN KEY (`serial_clgme`) REFERENCES `class_group_ministry_equivalence` (`serial_clgme`),
  CONSTRAINT `fk_selected_level_speciality` FOREIGN KEY (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year_specialty` (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `course`
--

LOCK TABLES `course` WRITE;
/*!40000 ALTER TABLE `course` DISABLE KEYS */;
/*!40000 ALTER TABLE `course` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `course_trg` BEFORE UPDATE ON `course` FOR EACH ROW BEGIN

	IF NEW.status_crs = 'INACTIVE' THEN

		

		UPDATE subject_course sbc

		SET sbc.status_sbc = 'INACTIVE'

		WHERE sbc.serial_crs = OLD.serial_crs;

		

		UPDATE student_by_course stc

		SET stc.status_stc = 'INACTIVE'

		WHERE stc.serial_crs = OLD.serial_crs;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `course_director`
--

DROP TABLE IF EXISTS `course_director`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `course_director` (
  `serial_emp` int(11) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  `status_crd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_144` (`serial_emp`),
  KEY `fk_relationship_145` (`serial_crs`),
  CONSTRAINT `fk_relationship_144` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`),
  CONSTRAINT `fk_relationship_145` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `course_director`
--

LOCK TABLES `course_director` WRITE;
/*!40000 ALTER TABLE `course_director` DISABLE KEYS */;
/*!40000 ALTER TABLE `course_director` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `course_director_behavior_rubric_for_discipline`
--

DROP TABLE IF EXISTS `course_director_behavior_rubric_for_discipline`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `course_director_behavior_rubric_for_discipline` (
  `serial_brd` int(11) NOT NULL AUTO_INCREMENT,
  `serial_sbp` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `evaluation_parameter_1_brd` enum('5','4','3','2') DEFAULT NULL,
  `evaluation_parameter_2_brd` enum('5','4','3','2') DEFAULT NULL,
  `evaluation_parameter_3_brd` enum('5','4','3','2') DEFAULT NULL,
  `evaluation_parameter_4_brd` enum('5','4','3','2') DEFAULT NULL,
  `evaluation_parameter_5_brd` enum('5','4','3','2') DEFAULT NULL,
  `evaluation_parameter_6_brd` enum('5','4','3','2') DEFAULT NULL,
  `evaluation_parameter_7_brd` enum('5','4','3','2') DEFAULT NULL,
  `evaluation_parameter_8_brd` enum('5','4','3','2') DEFAULT NULL,
  `evaluation_parameter_9_brd` enum('5','4','3','2') DEFAULT NULL,
  `evaluation_parameter_10_brd` enum('5','4','3','2') DEFAULT NULL,
  `course_director_sbp_grade_dsc_brd` decimal(8,5) DEFAULT NULL,
  PRIMARY KEY (`serial_brd`),
  KEY `fk_relationship_3530` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_3501` (`serial_sbp`),
  CONSTRAINT `fk_relationship_3501` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`),
  CONSTRAINT `fk_relationship_3530` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `course_director_behavior_rubric_for_discipline`
--

LOCK TABLES `course_director_behavior_rubric_for_discipline` WRITE;
/*!40000 ALTER TABLE `course_director_behavior_rubric_for_discipline` DISABLE KEYS */;
/*!40000 ALTER TABLE `course_director_behavior_rubric_for_discipline` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `credit_card`
--

DROP TABLE IF EXISTS `credit_card`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `credit_card` (
  `serial_ccd` int(11) NOT NULL AUTO_INCREMENT,
  `name_ccd` varchar(200) NOT NULL,
  `status_ccd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ccd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `credit_card`
--

LOCK TABLES `credit_card` WRITE;
/*!40000 ALTER TABLE `credit_card` DISABLE KEYS */;
/*!40000 ALTER TABLE `credit_card` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `credits_detail`
--

DROP TABLE IF EXISTS `credits_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `credits_detail` (
  `serial_cdt` int(11) NOT NULL AUTO_INCREMENT,
  `serial_hrs` int(11) DEFAULT NULL,
  `start_at_cdt` time NOT NULL,
  `end_at_cdt` time NOT NULL,
  `status_cdt` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_cdt`),
  KEY `fk_relationship_269` (`serial_hrs`),
  CONSTRAINT `fk_relationship_269` FOREIGN KEY (`serial_hrs`) REFERENCES `hour` (`serial_hrs`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `credits_detail`
--

LOCK TABLES `credits_detail` WRITE;
/*!40000 ALTER TABLE `credits_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `credits_detail` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `currency`
--

DROP TABLE IF EXISTS `currency`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `currency` (
  `serial_crr` int(11) NOT NULL AUTO_INCREMENT,
  `abrevation_crr` varchar(4) DEFAULT NULL,
  `name_crr` varchar(300) NOT NULL,
  `status_crr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_crr`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `currency`
--

LOCK TABLES `currency` WRITE;
/*!40000 ALTER TABLE `currency` DISABLE KEYS */;
INSERT INTO `currency` VALUES (1,'ARS','Argentine Peso','ACTIVE'),(2,'AUD','Australian Dollar','ACTIVE'),(3,'BHD','Bahrain Dinar','ACTIVE'),(4,'BWP','Botswana Pula','ACTIVE'),(5,'BRL','Brazilian Real','ACTIVE'),(6,'BND','Brunei Dollar','ACTIVE'),(7,'CAD','Canadian Dollar','ACTIVE'),(8,'CLP','Chilean Peso','ACTIVE'),(9,'CNY','Chinese Yuan','ACTIVE'),(10,'COP','Colombian Peso','ACTIVE'),(11,'CYP','Cyprus Pound','ACTIVE'),(12,'CZK','Czech Koruna','ACTIVE'),(13,'DKK','Danish Krone','ACTIVE'),(14,'EUR','Euro','ACTIVE'),(15,'HUF','Hungarian Forint','ACTIVE'),(16,'ISK','Icelandic Krona','ACTIVE'),(17,'INR','Indian Rupee','ACTIVE'),(18,'IDR','Indonesian Rupiah','ACTIVE'),(19,'IRR','Iranian Rial','ACTIVE'),(20,'ILS','Israeli New Sheqel','ACTIVE'),(21,'JPY','Japanese Yen','ACTIVE'),(22,'KRW','Korean Won','ACTIVE'),(23,'KWD','Kuwaiti Dinar','ACTIVE'),(24,'LYD','Libyan Dinar','ACTIVE'),(25,'MYR','Malaysian Ringgit','ACTIVE'),(26,'MTL','Maltese Lira','ACTIVE'),(27,'MUR','Mauritian Rupee','ACTIVE'),(28,'MXN','Mexican Peso','ACTIVE'),(29,'NPR','Nepalese Rupee','ACTIVE'),(30,'NZD','New Zealand Dollar','ACTIVE'),(31,'NOK','Norwegian Krone','ACTIVE'),(32,'OMR','Omani Rial','ACTIVE'),(33,'PKR','Pakistan Rupee','ACTIVE'),(34,'PLN','Polish Zloty','ACTIVE'),(35,'GBP','Pound Sterling','ACTIVE'),(36,'QAR','Qatar Riyal','ACTIVE'),(37,'SAR','Saudi Arabian Riyal','ACTIVE'),(38,'SGD','Singapore Dollar','ACTIVE'),(39,'SIT','Slovenian Tolar','ACTIVE'),(40,'ZAR','South African Rand','ACTIVE'),(41,'LKR','Sri Lanka Rupee','ACTIVE'),(42,'SEK','Swedish Krona','ACTIVE'),(43,'CHF','Swiss Franc','ACTIVE'),(44,'THB','Thai Baht','ACTIVE'),(45,'TTD','Trinidad and Tobago Dollar','ACTIVE'),(46,'AED','U.A.E.Dirham','ACTIVE'),(47,'USD','U.S.Dollar','ACTIVE'),(48,'VEB','Venezuelan Bolivar','ACTIVE');
/*!40000 ALTER TABLE `currency` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `current_deferred`
--

DROP TABLE IF EXISTS `current_deferred`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `current_deferred` (
  `serial_cdf` int(11) NOT NULL AUTO_INCREMENT,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_fic` int(11) DEFAULT NULL,
  `code_cdf` varchar(50) DEFAULT NULL,
  `total_quotas_cdf` int(11) NOT NULL,
  `quota_amount_cdf` decimal(10,2) NOT NULL,
  `paid_quotas_cdf` int(11) DEFAULT NULL,
  `last_month_paid_quota_cdf` varchar(3) DEFAULT NULL,
  `owner_cdf` varchar(300) NOT NULL,
  `kinship_cdf` varchar(300) NOT NULL,
  `transaction_date_cdf` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `students_cdf` varchar(60) DEFAULT NULL,
  `credit_code_cdf` varchar(20) DEFAULT NULL,
  `type_cdf` enum('ACADEMIC','NON_ACADEMIC') NOT NULL,
  `status_cdf` enum('ACTIVE','INACTIVE','PAID') NOT NULL DEFAULT 'ACTIVE',
  `confirm_status_cdf` enum('NEW','PENDING','OK','KO') NOT NULL DEFAULT 'NEW',
  PRIMARY KEY (`serial_cdf`),
  KEY `fk_relationship_338` (`serial_fic`),
  KEY `fk_relationship_340` (`serial_usr`),
  CONSTRAINT `fk_relationship_338` FOREIGN KEY (`serial_fic`) REFERENCES `financial_institution_card` (`serial_fic`),
  CONSTRAINT `fk_relationship_340` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `current_deferred`
--

LOCK TABLES `current_deferred` WRITE;
/*!40000 ALTER TABLE `current_deferred` DISABLE KEYS */;
/*!40000 ALTER TABLE `current_deferred` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `degree`
--

DROP TABLE IF EXISTS `degree`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `degree` (
  `serial_dgr` int(11) NOT NULL AUTO_INCREMENT,
  `name_dgr` varchar(255) NOT NULL,
  `status_dgr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_dgr`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `degree`
--

LOCK TABLES `degree` WRITE;
/*!40000 ALTER TABLE `degree` DISABLE KEYS */;
INSERT INTO `degree` VALUES (1,'Artes aplicadas','ACTIVE'),(2,'Auxiliar de laboratorio de ciencias naturales y Biología','ACTIVE'),(3,'Ciencias exactas','ACTIVE'),(4,'Ciencias sociales','ACTIVE'),(5,'Comercio y administración','ACTIVE'),(6,'Comunicación educativa','ACTIVE'),(7,'Contabilidad y administración','ACTIVE'),(8,'Diseño y dibujo','ACTIVE'),(9,'Docencia y desarrollo comunitario','ACTIVE'),(10,'Docencia y gestión en educación básica','ACTIVE'),(11,'Ecoturismo','ACTIVE'),(12,'Educación artística','ACTIVE'),(13,'Educación primaria','ACTIVE'),(14,'Educación especial','ACTIVE'),(15,'Educación inicial','ACTIVE'),(16,'Educación parvularia','ACTIVE'),(17,'Educación superior','ACTIVE'),(18,'Electricidad','ACTIVE'),(19,'Diplomado','ACTIVE'),(20,'Especialista','ACTIVE'),(21,'Phd','ACTIVE'),(22,'Máster','ACTIVE');
/*!40000 ALTER TABLE `degree` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `discipline`
--

DROP TABLE IF EXISTS `discipline`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `discipline` (
  `serial_prd` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `supervisor_grade_dsc` decimal(8,5) DEFAULT NULL,
  `subjects_grade_dsc` decimal(8,5) DEFAULT NULL,
  `course_director_grade_dsc` decimal(8,5) DEFAULT NULL,
  `general_grade_dsc` decimal(8,5) DEFAULT NULL,
  `adjustment_dsc` decimal(8,5) DEFAULT NULL,
  PRIMARY KEY (`serial_prd`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_130` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_130` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_131` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `discipline`
--

LOCK TABLES `discipline` WRITE;
/*!40000 ALTER TABLE `discipline` DISABLE KEYS */;
/*!40000 ALTER TABLE `discipline` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `discipline_equivalence`
--

DROP TABLE IF EXISTS `discipline_equivalence`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `discipline_equivalence` (
  `serial_deq` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `lower_percentage_deq` decimal(5,2) NOT NULL,
  `higher_percentage_deq` decimal(5,2) NOT NULL,
  `name_deq` varchar(50) NOT NULL,
  `code_deq` varchar(15) NOT NULL,
  `status_deq` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_deq`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `discipline_equivalence`
--

LOCK TABLES `discipline_equivalence` WRITE;
/*!40000 ALTER TABLE `discipline_equivalence` DISABLE KEYS */;
/*!40000 ALTER TABLE `discipline_equivalence` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `discount`
--

DROP TABLE IF EXISTS `discount`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `discount` (
  `serial_dsc` int(11) NOT NULL AUTO_INCREMENT,
  `name_dsc` varchar(200) NOT NULL,
  `status_dsc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_dsc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `discount`
--

LOCK TABLES `discount` WRITE;
/*!40000 ALTER TABLE `discount` DISABLE KEYS */;
/*!40000 ALTER TABLE `discount` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `discount_payment_concept`
--

DROP TABLE IF EXISTS `discount_payment_concept`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `discount_payment_concept` (
  `serial_ydc` int(11) NOT NULL,
  `serial_pct` int(11) NOT NULL,
  `status_dpc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ydc`,`serial_pct`),
  KEY `fk_relationship_227` (`serial_pct`),
  CONSTRAINT `fk_relationship_226` FOREIGN KEY (`serial_ydc`) REFERENCES `year_discount` (`serial_ydc`),
  CONSTRAINT `fk_relationship_227` FOREIGN KEY (`serial_pct`) REFERENCES `payment_concept` (`serial_pct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `discount_payment_concept`
--

LOCK TABLES `discount_payment_concept` WRITE;
/*!40000 ALTER TABLE `discount_payment_concept` DISABLE KEYS */;
/*!40000 ALTER TABLE `discount_payment_concept` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `documents`
--

DROP TABLE IF EXISTS `documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `documents` (
  `serial_dcm` int(11) NOT NULL AUTO_INCREMENT,
  `name_dcm` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`serial_dcm`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `documents`
--

LOCK TABLES `documents` WRITE;
/*!40000 ALTER TABLE `documents` DISABLE KEYS */;
/*!40000 ALTER TABLE `documents` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `education_level_guardian`
--

DROP TABLE IF EXISTS `education_level_guardian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `education_level_guardian` (
  `serial_elg` int(11) NOT NULL AUTO_INCREMENT,
  `name_elg` varchar(64) NOT NULL,
  `status_elg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'INACTIVE',
  PRIMARY KEY (`serial_elg`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `education_level_guardian`
--

LOCK TABLES `education_level_guardian` WRITE;
/*!40000 ALTER TABLE `education_level_guardian` DISABLE KEYS */;
INSERT INTO `education_level_guardian` VALUES (1,'NINGUNO','ACTIVE'),(2,'BÁSICA','ACTIVE'),(3,'BACHILLERATO','ACTIVE'),(4,'TERCER NIVEL','ACTIVE'),(5,'CUARTO NIVEL','ACTIVE');
/*!40000 ALTER TABLE `education_level_guardian` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Temporary view structure for view `empleados_con_almuerzo`
--

DROP TABLE IF EXISTS `empleados_con_almuerzo`;
/*!50001 DROP VIEW IF EXISTS `empleados_con_almuerzo`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `empleados_con_almuerzo` AS SELECT 
 1 AS `serial_emp`,
 1 AS `id_emp`,
 1 AS `last_name_emp`,
 1 AS `first_name_emp`,
 1 AS `week_days_eld`,
 1 AS `date_eld`*/;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `employee`
--

DROP TABLE IF EXISTS `employee`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `employee` (
  `serial_emp` int(11) NOT NULL AUTO_INCREMENT,
  `serial_tdg` int(11) DEFAULT NULL,
  `serial_usr` int(11) NOT NULL,
  `serial_grd` int(11) DEFAULT NULL,
  `serial_mdg` int(11) DEFAULT NULL,
  `serial_ste` int(11) DEFAULT NULL,
  `serial_cou` int(11) DEFAULT NULL,
  `serial_nnt` int(11) DEFAULT NULL,
  `serial_tst` int(11) DEFAULT NULL,
  `serial_unv` int(11) DEFAULT NULL,
  `serial_tmd` int(11) DEFAULT NULL,
  `serial_dgr` int(11) DEFAULT NULL,
  `id_emp` varchar(13) NOT NULL,
  `type_emp` set('TEACHING','ADMINISTRATIVE','SERVICES') DEFAULT NULL,
  `status_emp` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `first_name_emp` varchar(255) NOT NULL,
  `last_name_emp` varchar(255) NOT NULL,
  `specialty_emp` varchar(150) DEFAULT NULL,
  `gender_emp` enum('MALE','FEMALE') NOT NULL,
  `marital_status_emp` enum('SINGLE','MARRIED','DIVORCED','WIDOWED','UNMARRIED PARTNERS') DEFAULT NULL,
  `birthdate_emp` date NOT NULL,
  `address_emp` text NOT NULL,
  `city_emp` varchar(150) NOT NULL,
  `parish_emp` varchar(100) DEFAULT NULL,
  `sector_emp` varchar(50) DEFAULT NULL,
  `phone_emp` varchar(30) NOT NULL,
  `phone2_emp` varchar(30) DEFAULT NULL,
  `phone3_emp` varchar(30) DEFAULT NULL,
  `cellphone_emp` varchar(30) DEFAULT NULL,
  `email_emp` varchar(150) DEFAULT NULL,
  `email2_emp` varchar(150) DEFAULT NULL,
  `family_dependents_emp` int(11) DEFAULT NULL,
  `student_dependents_emp` int(11) DEFAULT NULL,
  `teaching_since_tea_emp` date DEFAULT NULL,
  `seniority_university_tea_emp` int(11) DEFAULT NULL,
  `date_start_in_school_emp` date NOT NULL,
  PRIMARY KEY (`serial_emp`),
  KEY `fk_employee_birth_country` (`serial_cou`),
  KEY `fk_employee_birth_state` (`serial_ste`),
  KEY `fk_employee_guardian2` (`serial_grd`),
  KEY `fk_employee_user` (`serial_usr`),
  KEY `fk_relationship_54` (`serial_nnt`),
  KEY `fk_relationship_55` (`serial_tdg`),
  KEY `fk_relationship_56` (`serial_tmd`),
  KEY `fk_relationship_57` (`serial_tst`),
  KEY `fk_relationship_58` (`serial_dgr`),
  KEY `fk_relationship_59` (`serial_mdg`),
  KEY `fk_relationship_60` (`serial_unv`),
  CONSTRAINT `fk_employee_birth_country` FOREIGN KEY (`serial_cou`) REFERENCES `country` (`serial_cou`),
  CONSTRAINT `fk_employee_birth_state` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`),
  CONSTRAINT `fk_employee_guardian2` FOREIGN KEY (`serial_grd`) REFERENCES `guardian` (`serial_grd`),
  CONSTRAINT `fk_employee_user` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_54` FOREIGN KEY (`serial_nnt`) REFERENCES `nationality` (`serial_nnt`),
  CONSTRAINT `fk_relationship_55` FOREIGN KEY (`serial_tdg`) REFERENCES `teacher_degree` (`serial_tdg`),
  CONSTRAINT `fk_relationship_56` FOREIGN KEY (`serial_tmd`) REFERENCES `teacher_master_degree` (`serial_tmd`),
  CONSTRAINT `fk_relationship_57` FOREIGN KEY (`serial_tst`) REFERENCES `teacher_specialty` (`serial_tst`),
  CONSTRAINT `fk_relationship_58` FOREIGN KEY (`serial_dgr`) REFERENCES `degree` (`serial_dgr`),
  CONSTRAINT `fk_relationship_59` FOREIGN KEY (`serial_mdg`) REFERENCES `master_degree` (`serial_mdg`),
  CONSTRAINT `fk_relationship_60` FOREIGN KEY (`serial_unv`) REFERENCES `university` (`serial_unv`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `employee`
--

LOCK TABLES `employee` WRITE;
/*!40000 ALTER TABLE `employee` DISABLE KEYS */;
/*!40000 ALTER TABLE `employee` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `employee_employee_area_trg` BEFORE UPDATE ON `employee` FOR EACH ROW BEGIN

	

	IF NEW.status_emp = 'INACTIVE' THEN

		UPDATE employee_area ea

		SET ea.status_eba = 'INACTIVE',

			ea.is_director_eba = 'NO'

		WHERE ea.serial_emp = OLD.serial_emp;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `employee_area`
--

DROP TABLE IF EXISTS `employee_area`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `employee_area` (
  `serial_aca` int(11) NOT NULL,
  `serial_emp` int(11) NOT NULL,
  `is_director_eba` enum('YES','NO') DEFAULT 'NO',
  `status_eba` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_aca`,`serial_emp`),
  KEY `fk_employee_in_area` (`serial_emp`),
  CONSTRAINT `fk_area_by_employee` FOREIGN KEY (`serial_aca`) REFERENCES `academic_area` (`serial_aca`),
  CONSTRAINT `fk_employee_in_area` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `employee_area`
--

LOCK TABLES `employee_area` WRITE;
/*!40000 ALTER TABLE `employee_area` DISABLE KEYS */;
/*!40000 ALTER TABLE `employee_area` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `employee_lunch_contract`
--

DROP TABLE IF EXISTS `employee_lunch_contract`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `employee_lunch_contract` (
  `serial_elc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_cle` int(11) NOT NULL,
  `serial_emp` int(11) NOT NULL,
  `days_elc` set('MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY') NOT NULL,
  `start_date_elc` date NOT NULL,
  `end_date_elc` date NOT NULL,
  `lunch_quantity_elc` int(11) NOT NULL,
  `final_price_elc` decimal(10,2) NOT NULL,
  `status_elc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_elc`),
  KEY `fk_relationship_8333` (`serial_cle`),
  KEY `fk_relationship_8334` (`serial_emp`),
  CONSTRAINT `fk_relationship_8333` FOREIGN KEY (`serial_cle`) REFERENCES `cat_lunch_employee` (`serial_cle`),
  CONSTRAINT `fk_relationship_8334` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `employee_lunch_contract`
--

LOCK TABLES `employee_lunch_contract` WRITE;
/*!40000 ALTER TABLE `employee_lunch_contract` DISABLE KEYS */;
/*!40000 ALTER TABLE `employee_lunch_contract` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `employee_lunch_contract_detail`
--

DROP TABLE IF EXISTS `employee_lunch_contract_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `employee_lunch_contract_detail` (
  `serial_eld` int(11) NOT NULL AUTO_INCREMENT,
  `serial_elc` int(11) NOT NULL,
  `week_days_eld` enum('MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY') NOT NULL,
  `date_eld` date NOT NULL,
  `status_eld` enum('ACTIVE','INACTIVE','CANCELLED') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_eld`),
  KEY `fk_relationship_8123333` (`serial_elc`),
  CONSTRAINT `fk_relationship_8123333` FOREIGN KEY (`serial_elc`) REFERENCES `employee_lunch_contract` (`serial_elc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `employee_lunch_contract_detail`
--

LOCK TABLES `employee_lunch_contract_detail` WRITE;
/*!40000 ALTER TABLE `employee_lunch_contract_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `employee_lunch_contract_detail` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `equipment`
--

DROP TABLE IF EXISTS `equipment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `equipment` (
  `serial_eqt` int(11) NOT NULL AUTO_INCREMENT,
  `code_eqt` varchar(20) DEFAULT NULL,
  `name_eqt` varchar(512) DEFAULT NULL,
  `partial_damage_value_eqt` decimal(10,0) DEFAULT NULL,
  `total_damage_value_eqt` decimal(10,0) DEFAULT NULL,
  `status_eqt` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `available_eqt` enum('YES','NO') NOT NULL DEFAULT 'YES',
  PRIMARY KEY (`serial_eqt`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `equipment`
--

LOCK TABLES `equipment` WRITE;
/*!40000 ALTER TABLE `equipment` DISABLE KEYS */;
/*!40000 ALTER TABLE `equipment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Temporary view structure for view `estudiantes_con_almuerzo`
--

DROP TABLE IF EXISTS `estudiantes_con_almuerzo`;
/*!50001 DROP VIEW IF EXISTS `estudiantes_con_almuerzo`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `estudiantes_con_almuerzo` AS SELECT 
 1 AS `serial_std`,
 1 AS `id_std`,
 1 AS `matricule_number_sty`,
 1 AS `last_name_std`,
 1 AS `first_name_std`,
 1 AS `week_day_sld`,
 1 AS `date_sld`*/;
SET character_set_client = @saved_cs_client;

--
-- Temporary view structure for view `estudiantes_con_refrigerio`
--

DROP TABLE IF EXISTS `estudiantes_con_refrigerio`;
/*!50001 DROP VIEW IF EXISTS `estudiantes_con_refrigerio`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `estudiantes_con_refrigerio` AS SELECT 
 1 AS `serial_std`,
 1 AS `id_std`,
 1 AS `matricule_number_sty`,
 1 AS `month_year_sfd`,
 1 AS `start_value_sfd`,
 1 AS `type_sfd`*/;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `exclusion_user`
--

DROP TABLE IF EXISTS `exclusion_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
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) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  `serial_emp` int(11) NOT NULL,
  `serial_prc` int(11) NOT NULL,
  `serial_csb` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_osb` int(11) DEFAULT NULL,
  `serial_sps` int(11) DEFAULT NULL,
  `date_exu` datetime NOT NULL,
  `date_inu` datetime DEFAULT NULL,
  `status_exu` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_exu`),
  KEY `fk_relationship_30000_idx` (`serial_scy`),
  KEY `fk_relationship_30001_idx` (`serial_sbp`),
  KEY `fk_relationship_30002_idx` (`serial_crs`),
  KEY `fk_relationship_30003_idx` (`serial_emp`),
  KEY `fk_relationship_30004_idx` (`serial_sbc`),
  KEY `fk_relationship_30005_idx` (`serial_osb`),
  KEY `fk_relationship_30006_idx` (`serial_sps`),
  KEY `fk_relationship_30007_idx` (`serial_prc`),
  KEY `fk_relationship_30008_idx` (`serial_prd`),
  KEY `fk_relationship_30009_idx` (`serial_csb`),
  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
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `exclusion_user`
--

LOCK TABLES `exclusion_user` WRITE;
/*!40000 ALTER TABLE `exclusion_user` DISABLE KEYS */;
/*!40000 ALTER TABLE `exclusion_user` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `family`
--

DROP TABLE IF EXISTS `family`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `family` (
  `serial_fml` int(11) NOT NULL AUTO_INCREMENT,
  `first_surname_fml` varchar(255) NOT NULL,
  `last_surname_fml` varchar(255) DEFAULT NULL,
  `main_street` varchar(100) NOT NULL,
  `secundary_street` varchar(100) NOT NULL,
  `number_street` varchar(10) NOT NULL,
  `serial_ste` int(11) NOT NULL,
  `serial_cnt` int(11) NOT NULL,
  `serial_par` int(11) NOT NULL,
  `phone2_fml` int(10) DEFAULT NULL,
  `phone_fml` varchar(255) DEFAULT NULL,
  `status_fml` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_fml`),
  KEY `serial_ste` (`serial_ste`),
  KEY `serial_cnt` (`serial_cnt`),
  KEY `serial_par` (`serial_par`),
  CONSTRAINT `family_ibfk_1` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`),
  CONSTRAINT `family_ibfk_2` FOREIGN KEY (`serial_cnt`) REFERENCES `counties` (`serial_cnt`),
  CONSTRAINT `family_ibfk_3` FOREIGN KEY (`serial_par`) REFERENCES `parish` (`serial_par`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `family`
--

LOCK TABLES `family` WRITE;
/*!40000 ALTER TABLE `family` DISABLE KEYS */;
/*!40000 ALTER TABLE `family` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `family_guardian`
--

DROP TABLE IF EXISTS `family_guardian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `family_guardian` (
  `serial_grd` int(11) NOT NULL,
  `serial_fml` int(11) NOT NULL,
  `status_fmg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_grd`,`serial_fml`),
  KEY `fk_relationship_345` (`serial_fml`),
  CONSTRAINT `fk_relationship_343` FOREIGN KEY (`serial_grd`) REFERENCES `guardian` (`serial_grd`),
  CONSTRAINT `fk_relationship_345` FOREIGN KEY (`serial_fml`) REFERENCES `family` (`serial_fml`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `family_guardian`
--

LOCK TABLES `family_guardian` WRITE;
/*!40000 ALTER TABLE `family_guardian` DISABLE KEYS */;
/*!40000 ALTER TABLE `family_guardian` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `feedback_form`
--

DROP TABLE IF EXISTS `feedback_form`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `feedback_form` (
  `serial_fdbf` int(11) NOT NULL AUTO_INCREMENT,
  `serial_asstu` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_fml` int(11) NOT NULL,
  `serial_crs` int(11) NOT NULL,
  `student_academic_perfrmance` tinytext,
  `student_social_integration` tinytext,
  `parent_comprimised` tinytext,
  `additional_comments` tinytext,
  PRIMARY KEY (`serial_fdbf`),
  KEY `fk_serial_asstu2_idx` (`serial_asstu`),
  KEY `fk_std_serial_2_idx` (`serial_std`),
  KEY `fk_serial:fml2_idx` (`serial_fml`),
  KEY `fk_serial_curse_idx` (`serial_crs`),
  CONSTRAINT `fk_serial:fml2` FOREIGN KEY (`serial_fml`) REFERENCES `family` (`serial_fml`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_serial_asstu2` FOREIGN KEY (`serial_asstu`) REFERENCES `aspirant_student` (`serial_asstu`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_serial_curse` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_std_serial_2` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `feedback_form`
--

LOCK TABLES `feedback_form` WRITE;
/*!40000 ALTER TABLE `feedback_form` DISABLE KEYS */;
/*!40000 ALTER TABLE `feedback_form` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `final_exams_change_log`
--

DROP TABLE IF EXISTS `final_exams_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `final_exams_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_sya` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `type_fecl` enum('RESIT','REMEDY','GRACE') DEFAULT 'RESIT',
  `change_date_fecl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_fecl` decimal(8,5) NOT NULL,
  `comment_fecl` text,
  KEY `fk_relationship_serials_avg_year` (`serial_sya`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_user_log_fem` (`serial_usr`),
  KEY `fk_relationship_clog_avg_year` (`serial_chr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `final_exams_change_log`
--

LOCK TABLES `final_exams_change_log` WRITE;
/*!40000 ALTER TABLE `final_exams_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `final_exams_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `financial_institution`
--

DROP TABLE IF EXISTS `financial_institution`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `financial_institution` (
  `serial_fin` int(11) NOT NULL AUTO_INCREMENT,
  `name_fin` varchar(255) NOT NULL,
  `phone1_fin` varchar(30) NOT NULL,
  `phone2_fin` varchar(30) NOT NULL,
  `status_fin` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_fin`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `financial_institution`
--

LOCK TABLES `financial_institution` WRITE;
/*!40000 ALTER TABLE `financial_institution` DISABLE KEYS */;
/*!40000 ALTER TABLE `financial_institution` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `financial_institution_card`
--

DROP TABLE IF EXISTS `financial_institution_card`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `financial_institution_card` (
  `serial_fic` int(11) NOT NULL AUTO_INCREMENT,
  `serial_fin` int(11) NOT NULL,
  `serial_ccd` int(11) NOT NULL,
  `wizard_fic` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `current_deferred_fic` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `status_fic` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_fic`),
  KEY `fk_relationship_336` (`serial_ccd`),
  KEY `fk_relationship_337` (`serial_fin`),
  CONSTRAINT `fk_relationship_336` FOREIGN KEY (`serial_ccd`) REFERENCES `credit_card` (`serial_ccd`),
  CONSTRAINT `fk_relationship_337` FOREIGN KEY (`serial_fin`) REFERENCES `financial_institution` (`serial_fin`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `financial_institution_card`
--

LOCK TABLES `financial_institution_card` WRITE;
/*!40000 ALTER TABLE `financial_institution_card` DISABLE KEYS */;
/*!40000 ALTER TABLE `financial_institution_card` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `general_activity`
--

DROP TABLE IF EXISTS `general_activity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `general_activity` (
  `serial_gac` int(11) NOT NULL AUTO_INCREMENT,
  `title_gac` varchar(50) NOT NULL,
  `description_gac` text NOT NULL,
  `create_date_gac` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `from_date_gac` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `to_date_gac` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `type_gac` enum('GENERAL','PERSONAL') NOT NULL DEFAULT 'GENERAL',
  `attachment_gac` varchar(128) DEFAULT NULL,
  `filename_gac` varchar(128) DEFAULT NULL,
  `status_gac` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_gac`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `general_activity`
--

LOCK TABLES `general_activity` WRITE;
/*!40000 ALTER TABLE `general_activity` DISABLE KEYS */;
/*!40000 ALTER TABLE `general_activity` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `general_activity_trg` BEFORE UPDATE ON `general_activity` FOR EACH ROW BEGIN

	

	IF NEW.status_gac LIKE '%INACTIVE%' THEN

		UPDATE general_activity_attendees gaa

		SET gaa.status_gaa = 'INACTIVE'

		WHERE gaa.serial_gac = OLD.serial_gac;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `general_activity_attendees`
--

DROP TABLE IF EXISTS `general_activity_attendees`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `general_activity_attendees` (
  `serial_gaa` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_gac` int(11) DEFAULT NULL,
  `type_gaa` enum('ALL','SECTION','COURSE','PERSONAL','TEACHER','EMPLOYEE','ACADEMIC_AREA') NOT NULL,
  `remote_id_gaa` int(11) DEFAULT NULL,
  `comments_gaa` text,
  `status_gaa` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_gaa`),
  KEY `fk_relationship_139` (`serial_scy`),
  KEY `fk_relationship_140` (`serial_gac`),
  CONSTRAINT `fk_relationship_139` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`),
  CONSTRAINT `fk_relationship_140` FOREIGN KEY (`serial_gac`) REFERENCES `general_activity` (`serial_gac`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `general_activity_attendees`
--

LOCK TABLES `general_activity_attendees` WRITE;
/*!40000 ALTER TABLE `general_activity_attendees` DISABLE KEYS */;
/*!40000 ALTER TABLE `general_activity_attendees` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `general_discipline_log`
--

DROP TABLE IF EXISTS `general_discipline_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `general_discipline_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `change_date_gdl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_gdl` decimal(8,5) NOT NULL,
  `comment_gdl` text,
  `type_gdl` enum('SUPERVISOR','GENERAL') NOT NULL DEFAULT 'SUPERVISOR',
  KEY `fk_relationship_151` (`serial_usr`),
  KEY `fk_relationship_152` (`serial_prd`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_153` (`serial_chr`),
  CONSTRAINT `fk_relationship_151` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_152` FOREIGN KEY (`serial_prd`, `serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `discipline` (`serial_prd`, `serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_153` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `general_discipline_log`
--

LOCK TABLES `general_discipline_log` WRITE;
/*!40000 ALTER TABLE `general_discipline_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `general_discipline_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `grade_change_log`
--

DROP TABLE IF EXISTS `grade_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `grade_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_att` int(11) DEFAULT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_gct` int(11) DEFAULT NULL,
  `serial_act` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  `change_date_gcl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_gcl` decimal(8,5) DEFAULT NULL,
  `comment_gcl` text,
  KEY `fk_relationship_123` (`serial_sbc`,`serial_att`,`serial_prd`,`serial_gct`,`serial_act`,`serial_std`,`serial_crs`),
  KEY `fk_relationship_124` (`serial_usr`),
  KEY `fk_relationship_150` (`serial_chr`),
  CONSTRAINT `fk_relationship_123` FOREIGN KEY (`serial_sbc`, `serial_att`, `serial_prd`, `serial_gct`, `serial_act`, `serial_std`, `serial_crs`) REFERENCES `student_criteria_grade` (`serial_sbc`, `serial_att`, `serial_prd`, `serial_gct`, `serial_act`, `serial_std`, `serial_crs`),
  CONSTRAINT `fk_relationship_124` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_150` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `grade_change_log`
--

LOCK TABLES `grade_change_log` WRITE;
/*!40000 ALTER TABLE `grade_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `grade_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `grade_criteria`
--

DROP TABLE IF EXISTS `grade_criteria`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `grade_criteria` (
  `serial_gct` int(11) NOT NULL AUTO_INCREMENT,
  `name_gct` varchar(256) NOT NULL,
  `description_gct` text NOT NULL,
  `status_gct` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_gct`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `grade_criteria`
--

LOCK TABLES `grade_criteria` WRITE;
/*!40000 ALTER TABLE `grade_criteria` DISABLE KEYS */;
INSERT INTO `grade_criteria` VALUES (1,'* General','Criterio General,se usa cuando no se va a aplicar criterios de calificación.','ACTIVE');
/*!40000 ALTER TABLE `grade_criteria` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `grade_score_change_log`
--

DROP TABLE IF EXISTS `grade_score_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `grade_score_change_log` (
  `serial_chr` int(11) DEFAULT NULL,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_ygs` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `change_date_gsl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_gsl` decimal(8,5) NOT NULL,
  `comment_gsl` text,
  KEY `fk_relationship_237` (`serial_ygs`,`serial_std`),
  KEY `fk_relationship_238` (`serial_chr`),
  KEY `fk_relationship_239` (`serial_usr`),
  CONSTRAINT `fk_relationship_237` FOREIGN KEY (`serial_ygs`, `serial_std`) REFERENCES `grade_subject_score` (`serial_ygs`, `serial_std`),
  CONSTRAINT `fk_relationship_238` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`),
  CONSTRAINT `fk_relationship_239` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `grade_score_change_log`
--

LOCK TABLES `grade_score_change_log` WRITE;
/*!40000 ALTER TABLE `grade_score_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `grade_score_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `grade_subject_score`
--

DROP TABLE IF EXISTS `grade_subject_score`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `grade_subject_score` (
  `serial_ygs` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `score_gss` decimal(8,5) DEFAULT NULL,
  `status_gss` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ygs`,`serial_std`),
  KEY `fk_relationship_177` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_176` FOREIGN KEY (`serial_ygs`) REFERENCES `year_grade_subject` (`serial_ygs`),
  CONSTRAINT `fk_relationship_177` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `grade_subject_score`
--

LOCK TABLES `grade_subject_score` WRITE;
/*!40000 ALTER TABLE `grade_subject_score` DISABLE KEYS */;
/*!40000 ALTER TABLE `grade_subject_score` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `group_hour`
--

DROP TABLE IF EXISTS `group_hour`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `group_hour` (
  `serial_gph` int(11) NOT NULL AUTO_INCREMENT,
  `name_gph` varchar(100) NOT NULL,
  `description_gph` text,
  `status_gph` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_gph`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `group_hour`
--

LOCK TABLES `group_hour` WRITE;
/*!40000 ALTER TABLE `group_hour` DISABLE KEYS */;
/*!40000 ALTER TABLE `group_hour` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `group_hour_level`
--

DROP TABLE IF EXISTS `group_hour_level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `group_hour_level` (
  `serial_gph` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `working_days_ghl` set('MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY','SUNDAY') DEFAULT NULL,
  `status_ghl` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_gph`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_levels_in_group_hour` (`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_group_hour_for_level` FOREIGN KEY (`serial_gph`) REFERENCES `group_hour` (`serial_gph`),
  CONSTRAINT `fk_levels_in_group_hour` FOREIGN KEY (`serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year` (`serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `group_hour_level`
--

LOCK TABLES `group_hour_level` WRITE;
/*!40000 ALTER TABLE `group_hour_level` DISABLE KEYS */;
/*!40000 ALTER TABLE `group_hour_level` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `group_optional_subject`
--

DROP TABLE IF EXISTS `group_optional_subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `group_optional_subject` (
  `serial_osb` int(11) DEFAULT NULL,
  `serial_lop` int(11) DEFAULT NULL,
  `status_gos` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_281` (`serial_osb`),
  KEY `fk_relationship_282` (`serial_lop`),
  CONSTRAINT `fk_relationship_281` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`),
  CONSTRAINT `fk_relationship_282` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `group_optional_subject`
--

LOCK TABLES `group_optional_subject` WRITE;
/*!40000 ALTER TABLE `group_optional_subject` DISABLE KEYS */;
/*!40000 ALTER TABLE `group_optional_subject` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `guardian`
--

DROP TABLE IF EXISTS `guardian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `guardian` (
  `serial_grd` int(11) NOT NULL AUTO_INCREMENT,
  `serial_usr` int(11) NOT NULL,
  `serial_emp` int(11) DEFAULT NULL,
  `serial_nnt` int(11) DEFAULT NULL,
  `serial_elg` int(11) DEFAULT NULL,
  `serial_ocg` int(11) DEFAULT NULL,
  `serial_dgr` int(11) DEFAULT NULL,
  `id_grd` varchar(13) NOT NULL,
  `first_name_grd` varchar(512) NOT NULL,
  `last_name_grd` varchar(512) NOT NULL,
  `birthdate_grd` date DEFAULT NULL,
  `gender_grd` enum('MALE','FEMALE') NOT NULL,
  `marital_status_grd` enum('SINGLE','MARRIED','DIVORCED','WIDOWED','UNMARRIED PARTNERS') NOT NULL DEFAULT 'MARRIED',
  `alumnus_grd` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `phone_grd` varchar(30) NOT NULL,
  `mobile_grd` varchar(30) DEFAULT NULL,
  `company_name_grd` varchar(100) DEFAULT NULL,
  `company_activity_grd` varchar(80) DEFAULT NULL,
  `role_in_company_grd` varchar(60) DEFAULT NULL,
  `company_phone_grd` varchar(13) DEFAULT NULL,
  `email_grd` varchar(256) DEFAULT NULL,
  `email2_grd` varchar(150) DEFAULT NULL,
  `lives_with_student_grd` enum('YES','NO') DEFAULT 'YES',
  `allow_to_pick_student_grd` enum('YES','NO') DEFAULT 'NO',
  `observation_grd` text,
  `status_grd` enum('ACTIVE','INACTIVE','BLOCKED') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_grd`),
  KEY `fk_employee_guardian` (`serial_emp`),
  KEY `fk_guardian_user` (`serial_usr`),
  KEY `FK_guardian_has_nationalty` (`serial_nnt`),
  KEY `FK_guardian_has_education_level` (`serial_elg`),
  KEY `FK_guardian_has_occupation` (`serial_ocg`),
  CONSTRAINT `FK_guardian_has_education_level` FOREIGN KEY (`serial_elg`) REFERENCES `education_level_guardian` (`serial_elg`),
  CONSTRAINT `FK_guardian_has_nationalty` FOREIGN KEY (`serial_nnt`) REFERENCES `nationality` (`serial_nnt`),
  CONSTRAINT `FK_guardian_has_occupation` FOREIGN KEY (`serial_ocg`) REFERENCES `occupation_guardian` (`serial_ocg`),
  CONSTRAINT `fk_employee_guardian` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`),
  CONSTRAINT `fk_guardian_user` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `guardian`
--

LOCK TABLES `guardian` WRITE;
/*!40000 ALTER TABLE `guardian` DISABLE KEYS */;
/*!40000 ALTER TABLE `guardian` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `guardian_address`
--

DROP TABLE IF EXISTS `guardian_address`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `guardian_address` (
  `serial_gda` int(11) NOT NULL AUTO_INCREMENT COMMENT 'clave primaria de la tabla guardian_address, autoincremental',
  `serial_grd` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla guardian',
  `serial_ste` int(11) NOT NULL COMMENT 'clave foranea perteneciante a la tabla provincia',
  `serial_cnt` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla canton',
  `serial_par` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla parroquia',
  `serial_zne` int(11) DEFAULT NULL COMMENT 'clave foranea perteneciente a la tabla zona',
  `main_street_gda` varchar(64) NOT NULL,
  `number_gda` varchar(32) NOT NULL,
  `secondary_street_gda` varchar(64) DEFAULT NULL,
  `address_type_gda` enum('HOME','WORK','OTHER') NOT NULL DEFAULT 'OTHER',
  `phone1_gda` varchar(32) DEFAULT NULL,
  `phone2_gda` varchar(32) DEFAULT NULL,
  `main_address_gda` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `status_gda` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE' COMMENT 'indica si la direccion esta en uso o esta borrada',
  PRIMARY KEY (`serial_gda`),
  KEY `FK_guardian_has_address` (`serial_grd`),
  KEY `FK_addressg_has_state` (`serial_ste`),
  KEY `FK_addressg_has_county` (`serial_cnt`),
  KEY `FK_addressg_has_parish` (`serial_par`),
  KEY `FK_addressg_has_zone` (`serial_zne`),
  CONSTRAINT `FK_addressg_has_county` FOREIGN KEY (`serial_cnt`) REFERENCES `counties` (`serial_cnt`),
  CONSTRAINT `FK_addressg_has_parish` FOREIGN KEY (`serial_par`) REFERENCES `parish` (`serial_par`),
  CONSTRAINT `FK_addressg_has_state` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`),
  CONSTRAINT `FK_addressg_has_zone` FOREIGN KEY (`serial_zne`) REFERENCES `zone_address` (`serial_zne`),
  CONSTRAINT `FK_guardian_has_address` FOREIGN KEY (`serial_grd`) REFERENCES `guardian` (`serial_grd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `guardian_address`
--

LOCK TABLES `guardian_address` WRITE;
/*!40000 ALTER TABLE `guardian_address` DISABLE KEYS */;
/*!40000 ALTER TABLE `guardian_address` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `guest`
--

DROP TABLE IF EXISTS `guest`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `guest` (
  `serial_gst` int(11) NOT NULL AUTO_INCREMENT,
  `id_gst` varchar(20) NOT NULL,
  `first_name_gst` varchar(128) NOT NULL,
  `last_name_gst` varchar(128) NOT NULL,
  `birthdate_gst` date NOT NULL,
  `gender_gst` enum('MALE','FEMALE') NOT NULL,
  `status_gst` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_gst`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `guest`
--

LOCK TABLES `guest` WRITE;
/*!40000 ALTER TABLE `guest` DISABLE KEYS */;
/*!40000 ALTER TABLE `guest` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `hour`
--

DROP TABLE IF EXISTS `hour`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `hour` (
  `serial_hrs` int(11) NOT NULL AUTO_INCREMENT,
  `start_hrs` time NOT NULL,
  `end_hrs` time NOT NULL,
  `status_hrs` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_hrs`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `hour`
--

LOCK TABLES `hour` WRITE;
/*!40000 ALTER TABLE `hour` DISABLE KEYS */;
/*!40000 ALTER TABLE `hour` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `hour_trg` BEFORE UPDATE ON `hour` FOR EACH ROW BEGIN

	

	IF NEW.status_hrs = 'INACTIVE' THEN

		UPDATE credits_detail cdt

		SET cdt.status_cdt = 'INACTIVE'

		WHERE cdt.serial_hrs = OLD.serial_hrs;

	ELSEIF NEW.status_hrs = 'ACTIVE' AND OLD.status_hrs != NEW.status_hrs THEN

		

		UPDATE credits_detail cdt

		SET cdt.status_cdt = 'ACTIVE'

		WHERE cdt.serial_hrs = OLD.serial_hrs;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `hour_by_group`
--

DROP TABLE IF EXISTS `hour_by_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `hour_by_group` (
  `serial_hbg` int(11) NOT NULL AUTO_INCREMENT,
  `serial_hrs` int(11) DEFAULT NULL,
  `serial_gph` int(11) DEFAULT NULL,
  `status_hbg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `credits_hbg` int(11) DEFAULT NULL,
  `type_hbg` enum('NORMAL','LUNCH','OTHER') NOT NULL DEFAULT 'NORMAL',
  PRIMARY KEY (`serial_hbg`),
  KEY `fk_for_group` (`serial_gph`),
  KEY `fk_is_in_group` (`serial_hrs`),
  CONSTRAINT `fk_for_group` FOREIGN KEY (`serial_gph`) REFERENCES `group_hour` (`serial_gph`),
  CONSTRAINT `fk_is_in_group` FOREIGN KEY (`serial_hrs`) REFERENCES `hour` (`serial_hrs`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `hour_by_group`
--

LOCK TABLES `hour_by_group` WRITE;
/*!40000 ALTER TABLE `hour_by_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `hour_by_group` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `improvement_plan`
--

DROP TABLE IF EXISTS `improvement_plan`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `improvement_plan` (
  `serial_imp` int(11) NOT NULL AUTO_INCREMENT,
  `code_imp` varchar(45) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `min_grade_imp` decimal(6,2) DEFAULT NULL,
  `max_grade_imp` decimal(6,2) DEFAULT NULL,
  `improvement_plan_text_imp` text NOT NULL,
  `status_imp` enum('ACTIVE','INACTIVE') NOT NULL,
  PRIMARY KEY (`serial_imp`),
  KEY `fk_improvement_plan_has_course_idx` (`serial_crs`),
  KEY `fk_improvement_plan_has_period_idx` (`serial_prd`),
  CONSTRAINT `fk_improvement_plan_has_course` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_improvement_plan_has_period` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `improvement_plan`
--

LOCK TABLES `improvement_plan` WRITE;
/*!40000 ALTER TABLE `improvement_plan` DISABLE KEYS */;
/*!40000 ALTER TABLE `improvement_plan` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `incident`
--

DROP TABLE IF EXISTS `incident`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `incident` (
  `serial_inc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_usr` int(11) DEFAULT NULL,
  `use_serial_usr` int(11) DEFAULT NULL,
  `date_inc` date NOT NULL,
  `report_date_inc` date NOT NULL,
  `description_inc` text NOT NULL,
  PRIMARY KEY (`serial_inc`),
  KEY `fk_relationship_194` (`use_serial_usr`),
  KEY `fk_relationship_195` (`serial_usr`),
  CONSTRAINT `fk_relationship_194` FOREIGN KEY (`use_serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_195` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `incident`
--

LOCK TABLES `incident` WRITE;
/*!40000 ALTER TABLE `incident` DISABLE KEYS */;
/*!40000 ALTER TABLE `incident` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `income_stock`
--

DROP TABLE IF EXISTS `income_stock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `income_stock` (
  `serial_ist` int(11) NOT NULL AUTO_INCREMENT,
  `serial_prv` int(11) DEFAULT NULL,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_mti` int(11) DEFAULT NULL,
  `income_ist` decimal(5,2) NOT NULL,
  `cost_ist` decimal(5,2) NOT NULL,
  `income_date_ist` date NOT NULL,
  `available_ist` decimal(5,2) NOT NULL,
  PRIMARY KEY (`serial_ist`),
  KEY `fk_relationship_184` (`serial_prv`),
  KEY `fk_relationship_185` (`serial_mti`),
  KEY `fk_relationship_186` (`serial_usr`),
  CONSTRAINT `fk_relationship_184` FOREIGN KEY (`serial_prv`) REFERENCES `provider` (`serial_prv`),
  CONSTRAINT `fk_relationship_185` FOREIGN KEY (`serial_mti`) REFERENCES `maintenance_item` (`serial_mti`),
  CONSTRAINT `fk_relationship_186` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `income_stock`
--

LOCK TABLES `income_stock` WRITE;
/*!40000 ALTER TABLE `income_stock` DISABLE KEYS */;
/*!40000 ALTER TABLE `income_stock` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `inquiry_unit`
--

DROP TABLE IF EXISTS `inquiry_unit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inquiry_unit` (
  `serial_inu` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) 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,
  `status_inu` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_inu`),
  KEY `inquiry_unit_school_year_fk_idx` (`serial_scy`),
  KEY `inquiry_unit_section_fk_idx` (`serial_set`),
  KEY `inquiry_unit_specialty_fk_idx` (`serial_spt`),
  KEY `inquiry_unit_level_fk_idx` (`serial_lvl`),
  CONSTRAINT `inquiry_unit_level_fk` FOREIGN KEY (`serial_lvl`) REFERENCES `level` (`serial_lvl`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  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
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `inquiry_unit`
--

LOCK TABLES `inquiry_unit` WRITE;
/*!40000 ALTER TABLE `inquiry_unit` DISABLE KEYS */;
/*!40000 ALTER TABLE `inquiry_unit` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `invoice`
--

DROP TABLE IF EXISTS `invoice`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoice` (
  `serial_phy` int(11) NOT NULL AUTO_INCREMENT,
  `payment_date_phy` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `subtotal_phy` decimal(10,2) NOT NULL,
  `taxes_phy` decimal(10,2) NOT NULL,
  `total_phy` decimal(10,2) NOT NULL,
  `id_paying_phy` varchar(15) DEFAULT NULL,
  `name_paying_phy` varchar(512) DEFAULT NULL,
  `phone_paying_phy` varchar(30) DEFAULT NULL,
  `address_paying_phy` varchar(1024) DEFAULT NULL,
  `physical_number_phy` varchar(128) DEFAULT NULL,
  `month_phy` varchar(3) NOT NULL,
  `due_date_phy` date NOT NULL,
  `status_phy` enum('ACTIVE','INACTIVE','PAID','VOID') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_phy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `invoice`
--

LOCK TABLES `invoice` WRITE;
/*!40000 ALTER TABLE `invoice` DISABLE KEYS */;
/*!40000 ALTER TABLE `invoice` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `invoice_detail`
--

DROP TABLE IF EXISTS `invoice_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoice_detail` (
  `serial_cdf` int(11) DEFAULT NULL,
  `serial_sva` int(11) DEFAULT NULL,
  `serial_deb` int(11) DEFAULT NULL,
  `serial_phy` int(11) DEFAULT NULL,
  `status_psd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_155` (`serial_phy`),
  KEY `fk_relationship_156` (`serial_deb`),
  KEY `fk_relationship_171` (`serial_cdf`),
  KEY `fk_relationship_231` (`serial_sva`),
  CONSTRAINT `fk_relationship_155` FOREIGN KEY (`serial_phy`) REFERENCES `invoice` (`serial_phy`),
  CONSTRAINT `fk_relationship_156` FOREIGN KEY (`serial_deb`) REFERENCES `student_year_debts` (`serial_deb`),
  CONSTRAINT `fk_relationship_171` FOREIGN KEY (`serial_cdf`) REFERENCES `current_deferred` (`serial_cdf`),
  CONSTRAINT `fk_relationship_231` FOREIGN KEY (`serial_sva`) REFERENCES `student_year_discount_values` (`serial_sva`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `invoice_detail`
--

LOCK TABLES `invoice_detail` WRITE;
/*!40000 ALTER TABLE `invoice_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `invoice_detail` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `invoice_detail_non_academic`
--

DROP TABLE IF EXISTS `invoice_detail_non_academic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoice_detail_non_academic` (
  `serial_sva` int(11) DEFAULT NULL,
  `serial_cdf` int(11) DEFAULT NULL,
  `serial_ina` int(11) DEFAULT NULL,
  `serial_deb` int(11) DEFAULT NULL,
  `status_idn` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_328` (`serial_ina`),
  KEY `fk_relationship_329` (`serial_deb`),
  KEY `fk_relationship_330` (`serial_sva`),
  KEY `fk_relationship_331` (`serial_cdf`),
  CONSTRAINT `fk_relationship_328` FOREIGN KEY (`serial_ina`) REFERENCES `invoice_non_academic` (`serial_ina`),
  CONSTRAINT `fk_relationship_329` FOREIGN KEY (`serial_deb`) REFERENCES `student_year_debts` (`serial_deb`),
  CONSTRAINT `fk_relationship_330` FOREIGN KEY (`serial_sva`) REFERENCES `student_year_discount_values` (`serial_sva`),
  CONSTRAINT `fk_relationship_331` FOREIGN KEY (`serial_cdf`) REFERENCES `current_deferred` (`serial_cdf`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `invoice_detail_non_academic`
--

LOCK TABLES `invoice_detail_non_academic` WRITE;
/*!40000 ALTER TABLE `invoice_detail_non_academic` DISABLE KEYS */;
/*!40000 ALTER TABLE `invoice_detail_non_academic` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `invoice_non_academic`
--

DROP TABLE IF EXISTS `invoice_non_academic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoice_non_academic` (
  `serial_ina` int(11) NOT NULL AUTO_INCREMENT,
  `payment_date_ina` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `subtotal_ina` decimal(10,2) NOT NULL,
  `taxes_ina` decimal(10,2) NOT NULL,
  `total_ina` decimal(10,2) NOT NULL,
  `id_paying_ina` varchar(15) DEFAULT NULL,
  `name_paying_ina` varchar(512) DEFAULT NULL,
  `phone_paying_ina` varchar(30) DEFAULT NULL,
  `address_paying_ina` varchar(1024) DEFAULT NULL,
  `physical_number_ina` varchar(128) DEFAULT NULL,
  `email_paying_ina` varchar(60) DEFAULT NULL,
  `month_ina` varchar(3) NOT NULL,
  `due_date_ina` date NOT NULL,
  `status_ina` enum('ACTIVE','INACTIVE','VOID','PAID') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ina`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `invoice_non_academic`
--

LOCK TABLES `invoice_non_academic` WRITE;
/*!40000 ALTER TABLE `invoice_non_academic` DISABLE KEYS */;
/*!40000 ALTER TABLE `invoice_non_academic` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `item_category`
--

DROP TABLE IF EXISTS `item_category`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `item_category` (
  `serial_ict` int(11) NOT NULL AUTO_INCREMENT,
  `name_ict` varchar(160) NOT NULL,
  `description_ict` text NOT NULL,
  `status_ict` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ict`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `item_category`
--

LOCK TABLES `item_category` WRITE;
/*!40000 ALTER TABLE `item_category` DISABLE KEYS */;
/*!40000 ALTER TABLE `item_category` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `language`
--

DROP TABLE IF EXISTS `language`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `language` (
  `serial_lng` int(11) NOT NULL AUTO_INCREMENT,
  `abbreviation_lng` varchar(3) DEFAULT NULL,
  `name_lng` varchar(50) NOT NULL,
  PRIMARY KEY (`serial_lng`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `language`
--

LOCK TABLES `language` WRITE;
/*!40000 ALTER TABLE `language` DISABLE KEYS */;
INSERT INTO `language` VALUES (1,'ES','Español'),(2,'EN','Inglés');
/*!40000 ALTER TABLE `language` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `level`
--

DROP TABLE IF EXISTS `level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level` (
  `serial_lvl` int(11) NOT NULL AUTO_INCREMENT,
  `name_lvl` varchar(150) NOT NULL,
  `description_lvl` text,
  `status_lvl` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_lvl`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `level`
--

LOCK TABLES `level` WRITE;
/*!40000 ALTER TABLE `level` DISABLE KEYS */;
/*!40000 ALTER TABLE `level` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `level_opt_skill_criteria`
--

DROP TABLE IF EXISTS `level_opt_skill_criteria`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level_opt_skill_criteria` (
  `serial_osc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_lop` int(11) DEFAULT NULL,
  `abbreviation_osc` varchar(5) NOT NULL,
  `description_osc` varchar(50) NOT NULL,
  `type_osc` enum('YEAR','PERIOD','SUBPERIOD','FINAL') NOT NULL DEFAULT 'YEAR',
  `status_osc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_osc`),
  KEY `fk_relationship_319` (`serial_lop`),
  CONSTRAINT `fk_relationship_319` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `level_opt_skill_criteria`
--

LOCK TABLES `level_opt_skill_criteria` WRITE;
/*!40000 ALTER TABLE `level_opt_skill_criteria` DISABLE KEYS */;
/*!40000 ALTER TABLE `level_opt_skill_criteria` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `level_optional_group`
--

DROP TABLE IF EXISTS `level_optional_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level_optional_group` (
  `serial_lop` int(11) NOT NULL AUTO_INCREMENT,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `name_lop` varchar(256) NOT NULL,
  `status_lop` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `hours_week_lop` int(11) NOT NULL,
  `order_lop` int(99) DEFAULT NULL,
  `hours_distribution_lop` varchar(512) DEFAULT NULL,
  PRIMARY KEY (`serial_lop`),
  KEY `fk_relationship_243` (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_243` FOREIGN KEY (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year_specialty` (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `level_optional_group`
--

LOCK TABLES `level_optional_group` WRITE;
/*!40000 ALTER TABLE `level_optional_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `level_optional_group` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `level_optional_group_detail`
--

DROP TABLE IF EXISTS `level_optional_group_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level_optional_group_detail` (
  `serial_prd` int(11) NOT NULL,
  `serial_lop` int(11) NOT NULL,
  `weight_ogd` decimal(5,2) NOT NULL,
  `status_ogd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_prd`,`serial_lop`),
  KEY `fk_relationship_244` (`serial_lop`),
  CONSTRAINT `fk_relationship_244` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`),
  CONSTRAINT `fk_relationship_245` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `level_optional_group_detail`
--

LOCK TABLES `level_optional_group_detail` WRITE;
/*!40000 ALTER TABLE `level_optional_group_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `level_optional_group_detail` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `level_section_year`
--

DROP TABLE IF EXISTS `level_section_year`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level_section_year` (
  `serial_pgy` int(11) DEFAULT NULL,
  `serial_lvl` int(11) NOT NULL,
  `discipline_lsy` enum('SUPERVISOR','TEACHERS','BOTH','COURSE_DIRECTOR','BOTH_1','BOTH_2','ALL') DEFAULT NULL,
  `supervisor_grade_weight_lsy` decimal(5,2) DEFAULT NULL,
  `teacher_grade_weight_lsy` decimal(5,2) DEFAULT NULL,
  `course_director_grade_weight_lsy` decimal(5,2) DEFAULT NULL,
  `order_lsy` int(11) DEFAULT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `status_lsy` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_period_group_level` (`serial_pgy`),
  KEY `fk_section_for_level` (`serial_scy`,`serial_set`),
  CONSTRAINT `fk_level_in_section` FOREIGN KEY (`serial_lvl`) REFERENCES `level` (`serial_lvl`),
  CONSTRAINT `fk_period_group_level` FOREIGN KEY (`serial_pgy`) REFERENCES `period_group_year` (`serial_pgy`),
  CONSTRAINT `fk_section_for_level` FOREIGN KEY (`serial_scy`, `serial_set`) REFERENCES `section_by_year` (`serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `level_section_year`
--

LOCK TABLES `level_section_year` WRITE;
/*!40000 ALTER TABLE `level_section_year` DISABLE KEYS */;
/*!40000 ALTER TABLE `level_section_year` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `level_seccion_year_trg` BEFORE UPDATE ON `level_section_year` FOR EACH ROW BEGIN

	

	IF NEW.status_lsy = 'INACTIVE' THEN

		UPDATE level_section_year_specialty lsys

		SET lsys.status_lss = 'INACTIVE'

		WHERE lsys.serial_lvl = OLD.serial_lvl

		AND	lsys.serial_scy = OLD.serial_scy

		AND	lsys.serial_set = OLD.serial_set;

		

		UPDATE group_hour_level ghl

		SET ghl.status_ghl = 'INACTIVE'

		WHERE ghl.serial_lvl = OLD.serial_lvl

		AND	ghl.serial_scy = OLD.serial_scy

		AND	ghl.serial_set = OLD.serial_set;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `level_section_year_lunch_type`
--

DROP TABLE IF EXISTS `level_section_year_lunch_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level_section_year_lunch_type` (
  `serial_lyt` int(11) NOT NULL AUTO_INCREMENT,
  `serial_ylp` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `status_lyt` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_lyt`),
  KEY `fk_relationship_6003` (`serial_ylp`),
  KEY `fk_relationship_6004` (`serial_spt`),
  KEY `fk_relationship_6005` (`serial_lvl`),
  KEY `fk_relationship_6006` (`serial_scy`),
  KEY `fk_relationship_6007` (`serial_set`),
  CONSTRAINT `fk_relationship_6003` FOREIGN KEY (`serial_ylp`) REFERENCES `year_lunch_type_price` (`serial_ylp`),
  CONSTRAINT `fk_relationship_6004` FOREIGN KEY (`serial_spt`) REFERENCES `specialty` (`serial_spt`),
  CONSTRAINT `fk_relationship_6005` FOREIGN KEY (`serial_lvl`) REFERENCES `level` (`serial_lvl`),
  CONSTRAINT `fk_relationship_6006` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`),
  CONSTRAINT `fk_relationship_6007` FOREIGN KEY (`serial_set`) REFERENCES `section` (`serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `level_section_year_lunch_type`
--

LOCK TABLES `level_section_year_lunch_type` WRITE;
/*!40000 ALTER TABLE `level_section_year_lunch_type` DISABLE KEYS */;
/*!40000 ALTER TABLE `level_section_year_lunch_type` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `level_section_year_specialty`
--

DROP TABLE IF EXISTS `level_section_year_specialty`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level_section_year_specialty` (
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `status_lss` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_selected_level` (`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_selected_level` FOREIGN KEY (`serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year` (`serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_selected_specialty` FOREIGN KEY (`serial_spt`) REFERENCES `specialty` (`serial_spt`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `level_section_year_specialty`
--

LOCK TABLES `level_section_year_specialty` WRITE;
/*!40000 ALTER TABLE `level_section_year_specialty` DISABLE KEYS */;
/*!40000 ALTER TABLE `level_section_year_specialty` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `specialty_level_seccion_trg` BEFORE UPDATE ON `level_section_year_specialty` FOR EACH ROW BEGIN

	IF NEW.status_lss = 'INACTIVE' THEN

	

		UPDATE course c

		SET c.status_crs = 'INACTIVE'

		WHERE c.serial_spt = OLD.serial_spt

		AND	c.serial_lvl = OLD.serial_lvl

		AND	c.serial_scy = OLD.serial_scy

		AND	c.serial_set = OLD.serial_set;

		

		UPDATE subject sbj

		SET sbj.status_sbj = 'INACTIVE'

		WHERE sbj.serial_spt = OLD.serial_spt

		AND	sbj.serial_lvl = OLD.serial_lvl

		AND	sbj.serial_scy = OLD.serial_scy

		AND	sbj.serial_set = OLD.serial_set;

		

		UPDATE optional_subject_level osl

		SET osl.status_osl = 'INACTIVE'

		WHERE osl.serial_spt = OLD.serial_spt

		AND	osl.serial_lvl = OLD.serial_lvl

		AND	osl.serial_scy = OLD.serial_scy

		AND	osl.serial_set = OLD.serial_set;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `level_section_year_specialty_ministry_name`
--

DROP TABLE IF EXISTS `level_section_year_specialty_ministry_name`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level_section_year_specialty_ministry_name` (
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `name_ministry` text NOT NULL,
  `order_lssm` smallint(6) DEFAULT NULL,
  `status_lssm` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `level_section_year_specialty_ministry_name`
--

LOCK TABLES `level_section_year_specialty_ministry_name` WRITE;
/*!40000 ALTER TABLE `level_section_year_specialty_ministry_name` DISABLE KEYS */;
/*!40000 ALTER TABLE `level_section_year_specialty_ministry_name` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `level_skill_grade_criteria`
--

DROP TABLE IF EXISTS `level_skill_grade_criteria`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `level_skill_grade_criteria` (
  `serial_lsc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `abbreviation_lsc` varchar(5) NOT NULL,
  `description_lsc` varchar(50) NOT NULL,
  `type_lsc` enum('YEAR','PERIOD','SUBPERIOD','FINAL') NOT NULL DEFAULT 'YEAR',
  `status_lsc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_lsc`),
  KEY `fk_relationship_317` (`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_317` FOREIGN KEY (`serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year` (`serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `level_skill_grade_criteria`
--

LOCK TABLES `level_skill_grade_criteria` WRITE;
/*!40000 ALTER TABLE `level_skill_grade_criteria` DISABLE KEYS */;
/*!40000 ALTER TABLE `level_skill_grade_criteria` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `library_section`
--

DROP TABLE IF EXISTS `library_section`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `library_section` (
  `serial_lst` int(11) NOT NULL AUTO_INCREMENT,
  `name_lst` varchar(128) NOT NULL,
  `status_lst` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_lst`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `library_section`
--

LOCK TABLES `library_section` WRITE;
/*!40000 ALTER TABLE `library_section` DISABLE KEYS */;
/*!40000 ALTER TABLE `library_section` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `loan`
--

DROP TABLE IF EXISTS `loan`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `loan` (
  `serial_loa` int(11) NOT NULL AUTO_INCREMENT,
  `serial_usr` int(11) DEFAULT NULL,
  `date_loa` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `due_date_loa` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `status_loa` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_loa`),
  KEY `fk_relationship_280` (`serial_usr`),
  CONSTRAINT `fk_relationship_280` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `loan`
--

LOCK TABLES `loan` WRITE;
/*!40000 ALTER TABLE `loan` DISABLE KEYS */;
/*!40000 ALTER TABLE `loan` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `loan_detail`
--

DROP TABLE IF EXISTS `loan_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `loan_detail` (
  `serial_stp` int(11) DEFAULT NULL,
  `serial_bkc` int(11) DEFAULT NULL,
  `serial_loa` int(11) DEFAULT NULL,
  `serial_eqt` int(11) DEFAULT NULL,
  `returned_ldt` enum('YES','NO') NOT NULL DEFAULT 'NO',
  KEY `fk_relationship_276` (`serial_eqt`),
  KEY `fk_relationship_277` (`serial_stp`),
  KEY `fk_relationship_278` (`serial_bkc`),
  KEY `fk_relationship_279` (`serial_loa`),
  CONSTRAINT `fk_relationship_276` FOREIGN KEY (`serial_eqt`) REFERENCES `equipment` (`serial_eqt`),
  CONSTRAINT `fk_relationship_277` FOREIGN KEY (`serial_stp`) REFERENCES `study_place` (`serial_stp`),
  CONSTRAINT `fk_relationship_278` FOREIGN KEY (`serial_bkc`) REFERENCES `book_copy` (`serial_bkc`),
  CONSTRAINT `fk_relationship_279` FOREIGN KEY (`serial_loa`) REFERENCES `loan` (`serial_loa`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `loan_detail`
--

LOCK TABLES `loan_detail` WRITE;
/*!40000 ALTER TABLE `loan_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `loan_detail` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `maintenance_item`
--

DROP TABLE IF EXISTS `maintenance_item`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maintenance_item` (
  `serial_mti` int(11) NOT NULL AUTO_INCREMENT,
  `serial_ict` int(11) DEFAULT NULL,
  `name_mti` varchar(160) NOT NULL,
  `description_mti` text NOT NULL,
  `brand_mti` varchar(128) NOT NULL,
  `status_mti` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_mti`),
  KEY `fk_relationship_183` (`serial_ict`),
  CONSTRAINT `fk_relationship_183` FOREIGN KEY (`serial_ict`) REFERENCES `item_category` (`serial_ict`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `maintenance_item`
--

LOCK TABLES `maintenance_item` WRITE;
/*!40000 ALTER TABLE `maintenance_item` DISABLE KEYS */;
/*!40000 ALTER TABLE `maintenance_item` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `master_degree`
--

DROP TABLE IF EXISTS `master_degree`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `master_degree` (
  `serial_mdg` int(11) NOT NULL AUTO_INCREMENT,
  `name_mdg` varchar(255) NOT NULL,
  `status_mdg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_mdg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `master_degree`
--

LOCK TABLES `master_degree` WRITE;
/*!40000 ALTER TABLE `master_degree` DISABLE KEYS */;
/*!40000 ALTER TABLE `master_degree` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `medical_file`
--

DROP TABLE IF EXISTS `medical_file`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `medical_file` (
  `serial_mdf` int(11) NOT NULL AUTO_INCREMENT,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_gst` int(11) DEFAULT NULL,
  `chronic_disease_mdf` text,
  `weight_mdf` decimal(5,2) NOT NULL,
  `allergy_mdf` text,
  `allergy_medication_mdf` text,
  `reaction_medicine_mdf` text,
  `fever_medication_mdf` text NOT NULL,
  `headache_medication_mdf` text NOT NULL,
  `stomachache_medication_mdf` text NOT NULL,
  `registration_date_mdf` date NOT NULL,
  `status_mdf` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `family_physician_mdf` varchar(256) DEFAULT NULL,
  `emergency_call_name_mdf` varchar(256) DEFAULT NULL,
  `emergency_call_name2_mdf` varchar(256) DEFAULT NULL,
  `emergency_call_phone_mdf` varchar(13) DEFAULT NULL,
  `emergency_call_phone2_mdf` varchar(13) DEFAULT NULL,
  `hospital_preference1_mdf` varchar(200) DEFAULT NULL,
  `hospital_preference2_mdf` varchar(200) DEFAULT NULL,
  `blood_type_mdf` varchar(10) DEFAULT NULL,
  `restrictions_mdf` text,
  `emergency_auth_mdf` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `physician_mobile_mdf` varchar(30) DEFAULT NULL,
  `physician_office_mdf` varchar(255) DEFAULT NULL,
  `height_mdf` decimal(5,2) DEFAULT NULL,
  PRIMARY KEY (`serial_mdf`),
  KEY `fk_relationship_196` (`serial_gst`),
  KEY `fk_relationship_65` (`serial_usr`),
  CONSTRAINT `fk_relationship_196` FOREIGN KEY (`serial_gst`) REFERENCES `guest` (`serial_gst`),
  CONSTRAINT `fk_relationship_65` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `medical_file`
--

LOCK TABLES `medical_file` WRITE;
/*!40000 ALTER TABLE `medical_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `medical_file` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `message`
--

DROP TABLE IF EXISTS `message`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `message` (
  `serial_msg` int(11) NOT NULL AUTO_INCREMENT,
  `serial_usr_receive` int(11) DEFAULT NULL,
  `serial_prf` int(11) DEFAULT NULL,
  `serial_usr_send` int(11) DEFAULT NULL,
  `type_msg` enum('PRIVATE','PUBLIC') NOT NULL DEFAULT 'PUBLIC',
  `user_from_name_msg` varchar(256) NOT NULL,
  `user_to_name_msg` varchar(256) NOT NULL,
  `subject_msg` varchar(128) NOT NULL,
  `message_msg` text NOT NULL,
  `checked_msg` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `saved_msg` enum('YES','NO') DEFAULT 'NO',
  `deleted_msg` enum('YES','NO') DEFAULT 'NO',
  `removed_permanently_msg` enum('YES','NO') DEFAULT 'NO',
  `send_date_msg` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `check_date_msg` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `filename_msg` varchar(50) DEFAULT NULL,
  `attachment_msg` varchar(50) DEFAULT NULL,
  `priority_msg` enum('URGENT','NORMAL') NOT NULL DEFAULT 'NORMAL',
  PRIMARY KEY (`serial_msg`),
  KEY `fk_relationship_136` (`serial_usr_send`),
  KEY `fk_relationship_137` (`serial_usr_receive`),
  KEY `fk_relationship_154` (`serial_prf`),
  CONSTRAINT `fk_relationship_136` FOREIGN KEY (`serial_usr_send`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_137` FOREIGN KEY (`serial_usr_receive`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_154` FOREIGN KEY (`serial_prf`) REFERENCES `profile` (`serial_prf`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `message`
--

LOCK TABLES `message` WRITE;
/*!40000 ALTER TABLE `message` DISABLE KEYS */;
/*!40000 ALTER TABLE `message` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `message_between_profiles`
--

DROP TABLE IF EXISTS `message_between_profiles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `message_between_profiles` (
  `serial_prf` int(11) NOT NULL,
  `pro_serial_prf` int(11) NOT NULL,
  `status_mbp` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_prf`,`pro_serial_prf`),
  KEY `fk_relationship_142` (`pro_serial_prf`),
  CONSTRAINT `fk_relationship_141` FOREIGN KEY (`serial_prf`) REFERENCES `profile` (`serial_prf`),
  CONSTRAINT `fk_relationship_142` FOREIGN KEY (`pro_serial_prf`) REFERENCES `profile` (`serial_prf`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `message_between_profiles`
--

LOCK TABLES `message_between_profiles` WRITE;
/*!40000 ALTER TABLE `message_between_profiles` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_between_profiles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `message_thread`
--

DROP TABLE IF EXISTS `message_thread`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `message_thread` (
  `serial_mth` int(11) NOT NULL AUTO_INCREMENT,
  `serial_usr` int(11) DEFAULT NULL,
  `start_date_mth` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`serial_mth`),
  KEY `fk_relationship_138` (`serial_usr`),
  CONSTRAINT `fk_relationship_138` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `message_thread`
--

LOCK TABLES `message_thread` WRITE;
/*!40000 ALTER TABLE `message_thread` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_thread` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `message_thread_messages`
--

DROP TABLE IF EXISTS `message_thread_messages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `message_thread_messages` (
  `serial_mtm` int(11) NOT NULL AUTO_INCREMENT,
  `serial_mth` int(11) DEFAULT NULL,
  `serial_msg` int(11) DEFAULT NULL,
  PRIMARY KEY (`serial_mtm`),
  KEY `fk_relationship_134` (`serial_mth`),
  KEY `fk_relationship_135` (`serial_msg`),
  CONSTRAINT `fk_relationship_134` FOREIGN KEY (`serial_mth`) REFERENCES `message_thread` (`serial_mth`),
  CONSTRAINT `fk_relationship_135` FOREIGN KEY (`serial_msg`) REFERENCES `message` (`serial_msg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `message_thread_messages`
--

LOCK TABLES `message_thread_messages` WRITE;
/*!40000 ALTER TABLE `message_thread_messages` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_thread_messages` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `ministry_resit_change_log`
--

DROP TABLE IF EXISTS `ministry_resit_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ministry_resit_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_msb` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `change_date_mrc` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_mrc` decimal(8,5) NOT NULL,
  `comment_mrc` text,
  KEY `fk_relationship_254` (`serial_msb`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_257` (`serial_usr`),
  KEY `fk_relationship_258` (`serial_chr`),
  CONSTRAINT `fk_relationship_254` FOREIGN KEY (`serial_msb`, `serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `ministry_resit_student` (`serial_msb`, `serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_257` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_258` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `ministry_resit_change_log`
--

LOCK TABLES `ministry_resit_change_log` WRITE;
/*!40000 ALTER TABLE `ministry_resit_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `ministry_resit_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `ministry_resit_student`
--

DROP TABLE IF EXISTS `ministry_resit_student`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ministry_resit_student` (
  `serial_msb` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `required_grade_mrs` decimal(8,5) NOT NULL,
  `grade_mrs` decimal(8,5) DEFAULT NULL,
  `status_mrs` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_msb`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_255` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_255` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_256` FOREIGN KEY (`serial_msb`) REFERENCES `ministry_subject` (`serial_msb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `ministry_resit_student`
--

LOCK TABLES `ministry_resit_student` WRITE;
/*!40000 ALTER TABLE `ministry_resit_student` DISABLE KEYS */;
/*!40000 ALTER TABLE `ministry_resit_student` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `ministry_subject`
--

DROP TABLE IF EXISTS `ministry_subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ministry_subject` (
  `serial_msb` int(11) NOT NULL AUTO_INCREMENT,
  `name_msb` varchar(256) NOT NULL,
  `description_msb` text NOT NULL,
  `grade_type_msb` enum('QUALITATIVE','QUANTITATIVE') NOT NULL DEFAULT 'QUANTITATIVE',
  `status_msb` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_msb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `ministry_subject`
--

LOCK TABLES `ministry_subject` WRITE;
/*!40000 ALTER TABLE `ministry_subject` DISABLE KEYS */;
/*!40000 ALTER TABLE `ministry_subject` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `nationality`
--

DROP TABLE IF EXISTS `nationality`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nationality` (
  `serial_nnt` int(11) NOT NULL AUTO_INCREMENT,
  `name_nnt` varchar(255) NOT NULL,
  `status_nnt` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_nnt`)
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `nationality`
--

LOCK TABLES `nationality` WRITE;
/*!40000 ALTER TABLE `nationality` DISABLE KEYS */;
INSERT INTO `nationality` VALUES (1,'ECUATORIANA','ACTIVE'),(2,'AFGANA','ACTIVE'),(3,'ALBANA','ACTIVE'),(4,'ALEMANA','ACTIVE'),(5,'ARGENTINA','ACTIVE'),(6,'BAHAMES','ACTIVE'),(7,'BELGA','ACTIVE'),(8,'BOLIVIANA','ACTIVE'),(9,'BRASILEÑA','ACTIVE'),(10,'CHILENA','ACTIVE'),(11,'COLOMBIANA','ACTIVE'),(12,'COSTARRICENSE','ACTIVE'),(13,'ESPAÑOLA','ACTIVE'),(14,'ESTADOUNIDENSE','ACTIVE'),(15,'ITALIANA','ACTIVE'),(16,'MEXICANA','ACTIVE'),(17,'PARAGUAYA','ACTIVE'),(18,'PERUANA','ACTIVE'),(19,'PORTUGUESA','ACTIVE'),(20,'PUERTORRIQUEÑA','ACTIVE'),(21,'SUIZA','ACTIVE'),(22,'VENEZOLANA','ACTIVE'),(23,'CUBANA','ACTIVE'),(24,'ARABE','ACTIVE'),(25,'AUSTRALIANA','ACTIVE'),(26,'CAMBOYANA','ACTIVE'),(27,'CANADIENSE','ACTIVE'),(28,'CHINA','ACTIVE'),(29,'COREANA','ACTIVE'),(31,'DANESA','ACTIVE'),(32,'EGIPCIA','ACTIVE'),(33,'SALVADOREÑA','ACTIVE'),(34,'ESTONIA','ACTIVE'),(35,'ETIOPE','ACTIVE'),(36,'FILIPINA','ACTIVE'),(37,'FINLANDESA','ACTIVE'),(38,'FRANCESA','ACTIVE'),(39,'GALESA','ACTIVE'),(40,'GRIEGA','ACTIVE'),(41,'GUATEMALTECA','ACTIVE'),(42,'HAITIANA','ACTIVE'),(43,'HOLANDESA','ACTIVE'),(44,'HONDUREÑA','ACTIVE'),(45,'INDONESA','ACTIVE'),(46,'INGLESA','ACTIVE'),(47,'IRLANDESA','ACTIVE'),(48,'ISRAELI','ACTIVE'),(49,'JAPONESA','ACTIVE'),(50,'JORDANA','ACTIVE'),(51,'LAOSIANA','ACTIVE'),(52,'LETONA','ACTIVE'),(53,'LETONESA','ACTIVE'),(54,'MALAYA','ACTIVE'),(55,'MARROQUI','ACTIVE'),(56,'NICARAGÜENSE','ACTIVE'),(57,'NORUEGA','ACTIVE'),(58,'NEOCELANDESA','ACTIVE'),(59,'PANAMEÑA','ACTIVE'),(60,'RUMANA','ACTIVE'),(61,'RUSA','ACTIVE'),(62,'ECUATORIANA-INGLESA','ACTIVE'),(63,'ECUATORIANA-ESTADOUNIDENSE','ACTIVE'),(64,'ECUATORIANA-ARGENTINA','ACTIVE'),(65,'ECUATORIANA-ITALIANA','ACTIVE'),(66,'ECUATORIANA-ESTADOUNIDENSE-INGLESA','ACTIVE'),(67,'ECUATORIANA-MEXICANA','ACTIVE'),(68,'ECUATORIANA-ALEMANA','ACTIVE'),(69,'ECUATORIANA-ESPAÑOLA','ACTIVE'),(70,'ECUATORIANA-COLOMBIANA','ACTIVE'),(71,'ECUATORIANA-CHILENA','ACTIVE'),(72,'ECUATORIANA-PERUANA','ACTIVE'),(73,'ECUATORIANA-URUGUAYA','ACTIVE'),(74,'ECUATORIANA-PARAGUAYA','ACTIVE');
/*!40000 ALTER TABLE `nationality` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `occupation_guardian`
--

DROP TABLE IF EXISTS `occupation_guardian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `occupation_guardian` (
  `serial_ocg` int(11) NOT NULL AUTO_INCREMENT,
  `serial_arg` int(11) NOT NULL,
  `name_ocg` varchar(64) NOT NULL,
  `status_ocg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'INACTIVE',
  PRIMARY KEY (`serial_ocg`),
  KEY `FK_area_has_occupation` (`serial_arg`),
  CONSTRAINT `FK_area_has_occupation` FOREIGN KEY (`serial_arg`) REFERENCES `area_guardian` (`serial_arg`)
) ENGINE=InnoDB AUTO_INCREMENT=166 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `occupation_guardian`
--

LOCK TABLES `occupation_guardian` WRITE;
/*!40000 ALTER TABLE `occupation_guardian` DISABLE KEYS */;
INSERT INTO `occupation_guardian` VALUES (1,1,'ANÁLISIS DE RIESGOS','ACTIVE'),(2,1,'AUDITORÍA','ACTIVE'),(3,1,'CONSULTORÍA','ACTIVE'),(4,1,'CONTABILIDAD','ACTIVE'),(5,1,'CONTROL DE GESTIÓN','ACTIVE'),(6,1,'CORPORATE FINANCE / BANCA INVERSIÓN','ACTIVE'),(7,1,'CRÉDITOS Y COBRANZAS','ACTIVE'),(8,1,'CUENTAS CORRIENTES','ACTIVE'),(9,1,'EVALUACIÓN ECONÓMICA','ACTIVE'),(10,1,'FACTURACIÓN','ACTIVE'),(11,1,'FINANZAS','ACTIVE'),(12,1,'FINANZAS INTERNACIONALES','ACTIVE'),(13,1,'IMPUESTOS','ACTIVE'),(14,1,'INVERSIONES / PROYECTOS DE INVERSIÓN','ACTIVE'),(15,1,'ORGANIZACIÓN Y MÉTODOS','ACTIVE'),(16,1,'PLANTEAMIENTO ECONÓMICO-FINANCIERO','ACTIVE'),(17,1,'TESORERÍA','ACTIVE'),(18,2,'APODERADO ADUANAL','ACTIVE'),(19,2,'COMPRAS INTERNACIONAES / IMPORTACIÓN','ACTIVE'),(20,2,'CONSULTORÍAS COMERCIO EXTERIOR','ACTIVE'),(21,2,'VENTAS INTERNACIONALES / EXPORTACIÓN','ACTIVE'),(22,3,'ATENCIÓN AL CLIENTE','ACTIVE'),(23,3,'CALL CENTER','ACTIVE'),(24,3,'TELEMARKETING','ACTIVE'),(25,4,'COMERCIAL','ACTIVE'),(26,4,'COMERCIO EXTERIOR','ACTIVE'),(27,4,'DESARROLLO DE NEGOCIOS','ACTIVE'),(28,4,'NEGOCIOS INTERNACIONALES','ACTIVE'),(29,4,'PLANTEAMIENTO COMERCIAL','ACTIVE'),(30,4,'VENTAS','ACTIVE'),(31,5,'COMUNICACIÓN ','ACTIVE'),(32,5,'COMUNICACIONES EXTERNAS','ACTIVE'),(33,5,'COMUNICACIONES INTERNAS','ACTIVE'),(34,5,'PERIODISMO','ACTIVE'),(35,5,'RELACIONES INSTITUCIONALES/PUBLICAS','ACTIVE'),(36,5,'RESPONSABILIDAD SOCIAL','ACTIVE'),(37,6,'DISEÑO','ACTIVE'),(38,6,'DISEÑO DE INTERIORES / DECORACIÓN','ACTIVE'),(39,6,'DISEÑO GRÁFICO','ACTIVE'),(40,6,'DISEÑO INDUSTRIAL','ACTIVE'),(41,6,'DISEÑO MULTIMEDIA','ACTIVE'),(42,6,'DISEÑO TEXTIL E INDUMENTARIA','ACTIVE'),(43,6,'DISEÑO WEB','ACTIVE'),(44,7,'BIENESTAR ESTUDIANTIL','ACTIVE'),(45,7,'EDUCACIÓN','ACTIVE'),(46,7,'EDUCACIÓN ESPECIAL','ACTIVE'),(47,7,'EDUCACIÓN / DOCENTES','ACTIVE'),(48,7,'IDIOMAS','ACTIVE'),(49,7,'INVESTIGACIÓN Y DESARROLLO','ACTIVE'),(50,8,'CAMAREROS','ACTIVE'),(51,8,'CASINOS','ACTIVE'),(52,8,'GASTRONOMIA','ACTIVE'),(53,8,'HOTELERÍA','ACTIVE'),(54,8,'TURISMO','ACTIVE'),(55,9,'DIRECCIÓN','ACTIVE'),(56,9,'GERENCIA','ACTIVE'),(57,10,'ARQUITECTURA','ACTIVE'),(58,10,'CONSTRUCCIÓN','ACTIVE'),(59,10,'DIRECCIÓN DE OBRA','ACTIVE'),(60,10,'INGENIERÍA CIVIL','ACTIVE'),(61,10,'INSTRUMENTACIÓN','ACTIVE'),(62,10,'OPERACIONES','ACTIVE'),(63,10,'TOPOGRAFÍA','ACTIVE'),(64,10,'URBANISMO','ACTIVE'),(65,11,'INGENIERÍA AGRÓNOMA','ACTIVE'),(66,11,'INGENIERÍA AUTOMOTRIZ','ACTIVE'),(67,11,'INGENIERÍA DE PROCESOS','ACTIVE'),(68,11,'INGENIERÍA DE PRODUCTO','ACTIVE'),(69,11,'INGENIERÍA DE SISTEMAS INFORMÁTICOS','ACTIVE'),(70,11,'INGENIERÍA DE VENTAS','ACTIVE'),(71,11,'INGENIERÍA ELÉCTRICA Y ELECTRÓNICA','ACTIVE'),(72,11,'INGENIERÍA ELECTROMECÁNICA','ACTIVE'),(73,11,'INGENIERÍA EN ALIMENTOS','ACTIVE'),(74,11,'INGENIERÍA INDUSTRIAL','ACTIVE'),(75,11,'INGENIERÍA MECÁNICA','ACTIVE'),(76,11,'INGENIERÍA METALURGICA','ACTIVE'),(77,11,'INGENIERÍA OFICINA TÉCNICA / PROYECTO','ACTIVE'),(78,11,'INGENIERÍA QUÍMICA','ACTIVE'),(79,11,'INGENIERÍA TEXTIL','ACTIVE'),(80,12,'ASESORÍA LEGAL INTERNACIONAL','ACTIVE'),(81,12,'LEGAL','ACTIVE'),(82,12,'PRODUCTO','ACTIVE'),(83,13,'BUSINESS INTELLIGENCE','ACTIVE'),(84,13,'COMMUNITY MANAGMENT','ACTIVE'),(85,13,'CREATIVIDAD','ACTIVE'),(86,13,'E-COMMERCE','ACTIVE'),(87,13,'MARKETING','ACTIVE'),(88,13,'MEDIA PLANNING','ACTIVE'),(89,13,'MERCADOTECNIA INTERNACIONAL','ACTIVE'),(90,13,'MULTIMEDIA','ACTIVE'),(91,14,'EXPLORACIÓN MINERA Y PETROQUÍMICA','ACTIVE'),(92,14,'INGENIERÍA EN MINAS','ACTIVE'),(93,14,'INGENIERÍA EN PETRÓLEO Y PETROQUÍMICA','ACTIVE'),(94,14,'INGENIERÍA GEOLÓGICA','ACTIVE'),(95,14,'INSTRUMENTACIÓN MINERA','ACTIVE'),(96,14,'MEDIO AMBIENTE','ACTIVE'),(97,14,'MINERÍA/PETROLEO/GAS','ACTIVE'),(98,14,'SEGURIDAD INDUSTRIAL','ACTIVE'),(99,15,'AGRICULTOR','ACTIVE'),(100,15,'ALBAÑIL - COLOCADOR DE GYPSUM','ACTIVE'),(101,15,'ALBAÑIL - ENCOFRADOR','ACTIVE'),(102,15,'ALBAÑIL - FIERRERO','ACTIVE'),(103,15,'ALBAÑIL - HORMIGONERO','ACTIVE'),(104,15,'ALBAÑIL - MAMPOSTERO','ACTIVE'),(105,15,'AMA DE CASA','ACTIVE'),(106,15,'ARTESANO(A)','ACTIVE'),(107,15,'ARTISTA','ACTIVE'),(108,15,'BOMBERO','ACTIVE'),(109,15,'CARPINTERO - DE BANCO','ACTIVE'),(110,15,'CARPINTERO -  DE RIVERA','ACTIVE'),(111,15,'CARPINTERO - INSTALADOR DE PISO FLOTANTE','ACTIVE'),(112,15,'CERAMIQUERO - INSTALADOR DE CERAMICA','ACTIVE'),(113,15,'CERAMIQUERO - INSTALADOR DE GRANITO','ACTIVE'),(114,15,'CERAMIQUERO - INSTALADOR DE GRE','ACTIVE'),(115,15,'CERAMIQUERO - INSTALADOR DE MARMOL','ACTIVE'),(116,15,'CERAMIQUERO - INSTALADOR DE PORCELANATO','ACTIVE'),(117,15,'CHOFERES - TIPO A','ACTIVE'),(118,15,'CHOFERES - TIPO B','ACTIVE'),(119,15,'CHOFERES - TIPO C','ACTIVE'),(120,15,'CHOFERES - TIPO D','ACTIVE'),(121,15,'CHOFERES - TIPO E','ACTIVE'),(122,15,'CHOFERES - TIPO G','ACTIVE'),(123,15,'DESEMPLEADO(A)','ACTIVE'),(124,15,'ELECTRICO - DOMESTICO','ACTIVE'),(125,15,'ELECTRICO - INDUSTRIAL','ACTIVE'),(126,15,'ELECTRICO - INSTALADOR DE PORTEROS Y MOTORES ELÉCTRICOS DE PUERT','ACTIVE'),(127,15,'ESTETICA, PELUQUERÍA','ACTIVE'),(128,15,'ESTIBADOR','ACTIVE'),(129,15,'GASFITERO - ALCANTARILLADOS','ACTIVE'),(130,15,'GASFITERO - COLOCADOR DE TUBERIA DE ACERO','ACTIVE'),(131,15,'GASFITERO - COLOCADOR DE TUBERIA DE COBRE','ACTIVE'),(132,15,'GASFITERO - COLOCADOR DE TUBERIA DE PVC','ACTIVE'),(133,15,'GASFITERO - INSTALADOR SANITARIO','ACTIVE'),(134,15,'GUARDIAS DE SEGURIDAD','ACTIVE'),(135,15,'HOGAR - CUIDADO DE ADULTOS','ACTIVE'),(136,15,'HOGAR - CUIDADO DE INFANTES','ACTIVE'),(137,15,'HOGAR - CUIDADO DE PERSONAS CON DISCAPACIDAD','ACTIVE'),(138,15,'HOGAR - TRABAJO DOMÉSTICO','ACTIVE'),(139,15,'IMPULSADOR - PROMOTOR','ACTIVE'),(140,15,'JUBILADO(A)','ACTIVE'),(141,15,'LIMPIEZA','ACTIVE'),(142,15,'MECÁNICO','ACTIVE'),(143,15,'MILITAR','ACTIVE'),(144,15,'PEON','ACTIVE'),(145,15,'PINTOR - ESTUCADOR','ACTIVE'),(146,15,'PINTOR - GRAFIADOR','ACTIVE'),(147,15,'PINTOR - TEXTURADOR','ACTIVE'),(148,15,'POLICÍA','ACTIVE'),(149,15,'POLIFUNCIONALES - ATENCIÓN AL CLIENTE','ACTIVE'),(150,15,'POLIFUNCIONALES - AYUDANTES DE MOSTRADOR','ACTIVE'),(151,15,'POLIFUNCIONALES - AYUDANTES DE COCINA','ACTIVE'),(152,15,'POLIFUNCIONALES - BODEGUEROS','ACTIVE'),(153,15,'POLIFUNCIONALES - CAJERO','ACTIVE'),(154,15,'POLIFUNCIONALES - CALL CENTER','ACTIVE'),(155,15,'POLIFUNCIONALES - COCINEROS','ACTIVE'),(156,15,'POLIFUNCIONALES - MENSAJEROS','ACTIVE'),(157,15,'POLIFUNCIONALES - PERCHEROS','ACTIVE'),(158,15,'POLIFUNCIONALES - RECEPCIONISTA','ACTIVE'),(159,15,'POLIFUNCIONALES - VENDEDORES','ACTIVE'),(160,15,'SOLDADOR - API','ACTIVE'),(161,15,'SOLDADOR - DE ESTRUCTURAS','ACTIVE'),(162,15,'TRADUCTOR DE IDIOMAS','ACTIVE'),(163,16,'ENFERMERO(A)','ACTIVE'),(164,16,'MÉDICO','ACTIVE'),(165,16,'VETERINARIO(A)','ACTIVE');
/*!40000 ALTER TABLE `occupation_guardian` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `opt_activity`
--

DROP TABLE IF EXISTS `opt_activity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_activity` (
  `serial_opa` int(11) NOT NULL AUTO_INCREMENT,
  `name_opa` varchar(256) NOT NULL,
  `description_opa` text NOT NULL,
  `send_date_opa` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `due_date_opa` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `status_opa` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_opa`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_activity`
--

LOCK TABLES `opt_activity` WRITE;
/*!40000 ALTER TABLE `opt_activity` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_activity` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `opt_activity_trg` BEFORE UPDATE ON `opt_activity` FOR EACH ROW BEGIN 

	IF NEW.status_opa = 'INACTIVE' THEN

		

		UPDATE opt_activity_applied_criterias oaa

		SET oaa.status_oaa = 'INACTIVE'

		WHERE oaa.serial_opa = OLD.serial_opa;

		

		UPDATE opt_activity_attachment oat

		SET oat.status_oat = 'INACTIVE'

		WHERE oat.serial_opa = OLD.serial_opa;

	ELSEIF NEW.status_opa = 'ACTIVE' AND OLD.status_opa != NEW.status_opa THEN

		

		UPDATE opt_activity_applied_criterias oaa

		SET oaa.status_oaa = 'ACTIVE'

		WHERE oaa.serial_opa = OLD.serial_opa;

		

		UPDATE opt_activity_attachment oat

		SET oat.status_oat = 'ACTIVE'

		WHERE oat.serial_opa = OLD.serial_opa

		AND oat.status_oat = 'INACTIVE';

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `opt_activity_applied_criterias`
--

DROP TABLE IF EXISTS `opt_activity_applied_criterias`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_activity_applied_criterias` (
  `serial_opa` int(11) NOT NULL,
  `serial_gct` int(11) NOT NULL,
  `serial_osb` int(11) NOT NULL,
  `serial_att` int(11) NOT NULL,
  `serial_prd` int(11) NOT NULL,
  `weight_oaa` decimal(5,2) DEFAULT NULL,
  `status_oaa` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_opa`,`serial_gct`,`serial_osb`,`serial_att`,`serial_prd`),
  KEY `fk_relationship_117` (`serial_gct`,`serial_osb`,`serial_att`,`serial_prd`),
  CONSTRAINT `fk_relationship_117` FOREIGN KEY (`serial_gct`, `serial_osb`, `serial_att`, `serial_prd`) REFERENCES `opt_subject_year_activity_criteria_period` (`serial_gct`, `serial_osb`, `serial_att`, `serial_prd`),
  CONSTRAINT `fk_relationship_118` FOREIGN KEY (`serial_opa`) REFERENCES `opt_activity` (`serial_opa`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_activity_applied_criterias`
--

LOCK TABLES `opt_activity_applied_criterias` WRITE;
/*!40000 ALTER TABLE `opt_activity_applied_criterias` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_activity_applied_criterias` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `opt_activity_applied_criterias_trg` BEFORE UPDATE ON `opt_activity_applied_criterias` FOR EACH ROW BEGIN

	

	IF NEW.status_oaa = 'INACTIVE' THEN

		UPDATE opt_student_criteria_grade osg

		SET osg.status_osg = 'INACTIVE',

		    osg.grade_osg = NULL

		WHERE osg.serial_att = OLD.serial_att

		AND osg.serial_prd = OLD.serial_prd

		AND osg.serial_osb = OLD.serial_osb

		AND osg.serial_gct = OLD.serial_gct

		AND osg.serial_opa = OLD.serial_opa;

	ELSEIF NEW.status_oaa = 'ACTIVE' AND OLD.status_oaa != NEW.status_oaa THEN

	

		UPDATE opt_student_criteria_grade osg

		SET osg.status_osg = 'ACTIVE'

		WHERE osg.serial_att = OLD.serial_att

		AND osg.serial_prd = OLD.serial_prd

		AND osg.serial_osb = OLD.serial_osb

		AND osg.serial_gct = OLD.serial_gct

		AND osg.serial_opa = OLD.serial_opa;

	

		UPDATE opt_student_criteria_grade osg

		SET osg.is_complete_osg = 'NO'

		WHERE osg.serial_att = OLD.serial_att

		AND osg.serial_prd = OLD.serial_prd

		AND osg.serial_osb = OLD.serial_osb

		AND osg.serial_gct != OLD.serial_gct

		AND osg.serial_opa = OLD.serial_opa;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `opt_activity_attachment`
--

DROP TABLE IF EXISTS `opt_activity_attachment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_activity_attachment` (
  `serial_oat` int(11) NOT NULL AUTO_INCREMENT,
  `serial_opa` int(11) DEFAULT NULL,
  `name_oat` varchar(256) NOT NULL,
  `filename_oat` varchar(256) NOT NULL,
  `status_oat` enum('ACTIVE','INACTIVE','DELETED') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_oat`),
  KEY `fk_relationship_119` (`serial_opa`),
  CONSTRAINT `fk_relationship_119` FOREIGN KEY (`serial_opa`) REFERENCES `opt_activity` (`serial_opa`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_activity_attachment`
--

LOCK TABLES `opt_activity_attachment` WRITE;
/*!40000 ALTER TABLE `opt_activity_attachment` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_activity_attachment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `opt_grade_change_log`
--

DROP TABLE IF EXISTS `opt_grade_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_grade_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_opa` int(11) DEFAULT NULL,
  `serial_gct` int(11) DEFAULT NULL,
  `serial_osb` int(11) DEFAULT NULL,
  `serial_att` int(11) DEFAULT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `opt_change_date_ogc` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `opt_last_grade_ogc` decimal(8,5) DEFAULT NULL,
  `opt_comment_ogc` text,
  KEY `fk_relationship_125` (`serial_opa`,`serial_gct`,`serial_osb`,`serial_att`,`serial_prd`,`serial_std`),
  KEY `fk_relationship_126` (`serial_usr`),
  KEY `fk_relationship_149` (`serial_chr`),
  CONSTRAINT `fk_relationship_125` FOREIGN KEY (`serial_opa`, `serial_gct`, `serial_osb`, `serial_att`, `serial_prd`, `serial_std`) REFERENCES `opt_student_criteria_grade` (`serial_opa`, `serial_gct`, `serial_osb`, `serial_att`, `serial_prd`, `serial_std`),
  CONSTRAINT `fk_relationship_126` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_149` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_grade_change_log`
--

LOCK TABLES `opt_grade_change_log` WRITE;
/*!40000 ALTER TABLE `opt_grade_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_grade_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `opt_student_activity_attachment`
--

DROP TABLE IF EXISTS `opt_student_activity_attachment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_student_activity_attachment` (
  `serial_oth` int(11) NOT NULL AUTO_INCREMENT,
  `serial_opa` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `name_oth` varchar(256) NOT NULL,
  `filename_oth` varchar(256) NOT NULL,
  `status_oth` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_oth`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_student_activity_attachment`
--

LOCK TABLES `opt_student_activity_attachment` WRITE;
/*!40000 ALTER TABLE `opt_student_activity_attachment` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_student_activity_attachment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `opt_student_criteria_grade`
--

DROP TABLE IF EXISTS `opt_student_criteria_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_student_criteria_grade` (
  `serial_opa` int(11) NOT NULL,
  `serial_gct` int(11) NOT NULL,
  `serial_osb` int(11) NOT NULL,
  `serial_att` int(11) NOT NULL,
  `serial_prd` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `grade_osg` decimal(8,5) DEFAULT NULL,
  `is_complete_osg` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `activity_grade_part_osg` decimal(6,2) DEFAULT NULL,
  `status_osg` enum('ACTIVE','INACTIVE','NOT_APPLY') NOT NULL DEFAULT 'ACTIVE',
  `date_osg` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`serial_opa`,`serial_gct`,`serial_osb`,`serial_att`,`serial_prd`,`serial_std`),
  CONSTRAINT `fk_relationship_121` FOREIGN KEY (`serial_opa`, `serial_gct`, `serial_osb`, `serial_att`, `serial_prd`) REFERENCES `opt_activity_applied_criterias` (`serial_opa`, `serial_gct`, `serial_osb`, `serial_att`, `serial_prd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_student_criteria_grade`
--

LOCK TABLES `opt_student_criteria_grade` WRITE;
/*!40000 ALTER TABLE `opt_student_criteria_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_student_criteria_grade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `opt_subject_period_activity_type`
--

DROP TABLE IF EXISTS `opt_subject_period_activity_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_subject_period_activity_type` (
  `serial_att` int(11) NOT NULL,
  `serial_prd` int(11) NOT NULL,
  `serial_osb` int(11) NOT NULL,
  `weight_osa` decimal(5,2) NOT NULL,
  `due_min_days_osa` int(11) NOT NULL,
  `due_max_grade_osa` int(11) DEFAULT NULL,
  `status_osa` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `is_obligatory_osa` enum('YES','NO') NOT NULL DEFAULT 'NO',
  PRIMARY KEY (`serial_att`,`serial_prd`,`serial_osb`),
  KEY `fk_relationship_112` (`serial_prd`,`serial_osb`),
  CONSTRAINT `fk_relationship_112` FOREIGN KEY (`serial_prd`, `serial_osb`) REFERENCES `optional_subject_period` (`serial_prd`, `serial_osb`),
  CONSTRAINT `fk_relationship_113` FOREIGN KEY (`serial_att`) REFERENCES `activity_type` (`serial_att`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_subject_period_activity_type`
--

LOCK TABLES `opt_subject_period_activity_type` WRITE;
/*!40000 ALTER TABLE `opt_subject_period_activity_type` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_subject_period_activity_type` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `opt_subject_retest_change_log`
--

DROP TABLE IF EXISTS `opt_subject_retest_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_subject_retest_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_osr` int(11) DEFAULT NULL,
  `change_date_orl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_orl` decimal(8,5) NOT NULL,
  `comment_orl` text,
  KEY `fk_relationship_215` (`serial_std`,`serial_osr`),
  KEY `fk_relationship_216` (`serial_usr`),
  KEY `fk_relationship_217` (`serial_chr`),
  CONSTRAINT `fk_relationship_215` FOREIGN KEY (`serial_std`, `serial_osr`) REFERENCES `optional_subject_retest_student` (`serial_std`, `serial_osr`),
  CONSTRAINT `fk_relationship_216` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_217` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_subject_retest_change_log`
--

LOCK TABLES `opt_subject_retest_change_log` WRITE;
/*!40000 ALTER TABLE `opt_subject_retest_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_subject_retest_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `opt_subject_year_activity_criteria_period`
--

DROP TABLE IF EXISTS `opt_subject_year_activity_criteria_period`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_subject_year_activity_criteria_period` (
  `serial_gct` int(11) NOT NULL,
  `serial_osb` int(11) NOT NULL,
  `serial_att` int(11) NOT NULL,
  `serial_prd` int(11) NOT NULL,
  `status_oac` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `criteria_max_grade` decimal(8,5) DEFAULT NULL,
  PRIMARY KEY (`serial_gct`,`serial_osb`,`serial_att`,`serial_prd`),
  KEY `fk_relationship_114` (`serial_att`,`serial_prd`),
  CONSTRAINT `fk_relationship_114` FOREIGN KEY (`serial_att`, `serial_prd`) REFERENCES `opt_subject_period_activity_type` (`serial_att`, `serial_prd`),
  CONSTRAINT `fk_relationship_115` FOREIGN KEY (`serial_gct`, `serial_osb`) REFERENCES `opt_subject_year_grade_criteria` (`serial_gct`, `serial_osb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_subject_year_activity_criteria_period`
--

LOCK TABLES `opt_subject_year_activity_criteria_period` WRITE;
/*!40000 ALTER TABLE `opt_subject_year_activity_criteria_period` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_subject_year_activity_criteria_period` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `opt_subject_year_grade_criteria`
--

DROP TABLE IF EXISTS `opt_subject_year_grade_criteria`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `opt_subject_year_grade_criteria` (
  `serial_gct` int(11) NOT NULL,
  `serial_osb` int(11) NOT NULL,
  `status_oyc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_gct`,`serial_osb`),
  KEY `fk_relationship_110` (`serial_osb`),
  CONSTRAINT `fk_relationship_110` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`),
  CONSTRAINT `fk_relationship_111` FOREIGN KEY (`serial_gct`) REFERENCES `grade_criteria` (`serial_gct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `opt_subject_year_grade_criteria`
--

LOCK TABLES `opt_subject_year_grade_criteria` WRITE;
/*!40000 ALTER TABLE `opt_subject_year_grade_criteria` DISABLE KEYS */;
/*!40000 ALTER TABLE `opt_subject_year_grade_criteria` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `optional_subject`
--

DROP TABLE IF EXISTS `optional_subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `optional_subject` (
  `serial_osb` int(11) NOT NULL AUTO_INCREMENT,
  `serial_pgy` int(11) DEFAULT NULL,
  `serial_csb` int(11) DEFAULT NULL,
  `per_serial_pgy` int(11) DEFAULT NULL,
  `serial_aca` int(11) DEFAULT NULL,
  `serial_emp` int(11) DEFAULT NULL,
  `status_osb` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `grade_type_sbc` enum('QUALITATIVE','QUANTITATIVE') NOT NULL DEFAULT 'QUANTITATIVE',
  PRIMARY KEY (`serial_osb`),
  KEY `fk_relationship_116` (`per_serial_pgy`),
  KEY `fk_relationship_127` (`serial_aca`,`serial_emp`),
  KEY `fk_relationship_249` (`serial_pgy`),
  KEY `fk_relationship_53` (`serial_csb`),
  CONSTRAINT `fk_relationship_116` FOREIGN KEY (`per_serial_pgy`) REFERENCES `period_group_year` (`serial_pgy`),
  CONSTRAINT `fk_relationship_127` FOREIGN KEY (`serial_aca`, `serial_emp`) REFERENCES `employee_area` (`serial_aca`, `serial_emp`),
  CONSTRAINT `fk_relationship_249` FOREIGN KEY (`serial_pgy`) REFERENCES `period_group_year` (`serial_pgy`),
  CONSTRAINT `fk_relationship_53` FOREIGN KEY (`serial_csb`) REFERENCES `cat_subject` (`serial_csb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `optional_subject`
--

LOCK TABLES `optional_subject` WRITE;
/*!40000 ALTER TABLE `optional_subject` DISABLE KEYS */;
/*!40000 ALTER TABLE `optional_subject` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `optional_subject_trg` BEFORE UPDATE ON `optional_subject` FOR EACH ROW BEGIN 

	IF NEW.status_osb = 'INACTIVE' THEN

		

		UPDATE optional_subject_level osl

		SET osl.status_osl = 'INACTIVE'

		WHERE osl.serial_osb = OLD.serial_osb;

		

		UPDATE optional_subject_period osp

		SET osp.status_osp = 'INACTIVE'

		WHERE osp.serial_osb = OLD.serial_osb;

		

		UPDATE student_optional_subject sos

		SET sos.status_sos = 'INACTIVE'

		WHERE sos.serial_osb = OLD.serial_osb;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `optional_subject_level`
--

DROP TABLE IF EXISTS `optional_subject_level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `optional_subject_level` (
  `serial_osb` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `status_osl` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `optional_activities_number_osl` smallint(3) DEFAULT NULL,
  KEY `fk_relationship_104` (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_105` (`serial_osb`),
  CONSTRAINT `fk_relationship_104` FOREIGN KEY (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year_specialty` (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_105` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `optional_subject_level`
--

LOCK TABLES `optional_subject_level` WRITE;
/*!40000 ALTER TABLE `optional_subject_level` DISABLE KEYS */;
/*!40000 ALTER TABLE `optional_subject_level` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `optional_subject_period`
--

DROP TABLE IF EXISTS `optional_subject_period`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `optional_subject_period` (
  `serial_prd` int(11) NOT NULL,
  `serial_osb` int(11) NOT NULL,
  `status_osp` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `optional_activities_number_osp` smallint(3) DEFAULT NULL,
  PRIMARY KEY (`serial_prd`,`serial_osb`),
  KEY `fk_relationship_106` (`serial_osb`),
  CONSTRAINT `fk_relationship_106` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`),
  CONSTRAINT `fk_relationship_107` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `optional_subject_period`
--

LOCK TABLES `optional_subject_period` WRITE;
/*!40000 ALTER TABLE `optional_subject_period` DISABLE KEYS */;
/*!40000 ALTER TABLE `optional_subject_period` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `optional_subject_retest`
--

DROP TABLE IF EXISTS `optional_subject_retest`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `optional_subject_retest` (
  `serial_osr` int(11) NOT NULL AUTO_INCREMENT,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_osb` int(11) DEFAULT NULL,
  `description_osr` text NOT NULL,
  `sent_date_osr` date NOT NULL,
  `retest_date_osr` date NOT NULL,
  `weight_osr` decimal(5,2) NOT NULL,
  `status_osr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_osr`),
  KEY `fk_relationship_198` (`serial_prd`,`serial_osb`),
  CONSTRAINT `fk_relationship_198` FOREIGN KEY (`serial_prd`, `serial_osb`) REFERENCES `optional_subject_period` (`serial_prd`, `serial_osb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `optional_subject_retest`
--

LOCK TABLES `optional_subject_retest` WRITE;
/*!40000 ALTER TABLE `optional_subject_retest` DISABLE KEYS */;
/*!40000 ALTER TABLE `optional_subject_retest` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `optional_subject_retest_student`
--

DROP TABLE IF EXISTS `optional_subject_retest_student`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `optional_subject_retest_student` (
  `serial_std` int(11) NOT NULL,
  `serial_osr` int(11) NOT NULL,
  `grade_org` decimal(8,5) DEFAULT NULL,
  `status_org` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_std`,`serial_osr`),
  KEY `fk_relationship_199` (`serial_osr`),
  CONSTRAINT `fk_relationship_199` FOREIGN KEY (`serial_osr`) REFERENCES `optional_subject_retest` (`serial_osr`),
  CONSTRAINT `fk_relationship_200` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `optional_subject_retest_student`
--

LOCK TABLES `optional_subject_retest_student` WRITE;
/*!40000 ALTER TABLE `optional_subject_retest_student` DISABLE KEYS */;
/*!40000 ALTER TABLE `optional_subject_retest_student` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `parish`
--

DROP TABLE IF EXISTS `parish`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parish` (
  `serial_par` int(11) NOT NULL AUTO_INCREMENT COMMENT 'clave primaria de la tabla parroquia, autoincremental',
  `serial_cnt` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla canton',
  `name_par` varchar(64) NOT NULL COMMENT 'nombre de la parroquia',
  `status_par` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE' COMMENT 'define si la parroquia se encuentra activa',
  PRIMARY KEY (`serial_par`),
  KEY `FK_county_has_parish` (`serial_cnt`),
  CONSTRAINT `FK_county_has_parish` FOREIGN KEY (`serial_cnt`) REFERENCES `counties` (`serial_cnt`)
) ENGINE=InnoDB AUTO_INCREMENT=1238 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `parish`
--

LOCK TABLES `parish` WRITE;
/*!40000 ALTER TABLE `parish` DISABLE KEYS */;
INSERT INTO `parish` VALUES (1,1,'Baños','ACTIVE'),(2,1,'Bellavista','ACTIVE'),(3,1,'Cañaribamba','ACTIVE'),(4,1,'Chaucha','ACTIVE'),(5,1,'Checa','ACTIVE'),(6,1,'Chiquintad','ACTIVE'),(7,1,'Cuenca','ACTIVE'),(8,1,'Cumbe','ACTIVE'),(9,1,'El Batán','ACTIVE'),(10,1,'El Sagrario','ACTIVE'),(11,1,'El Valle','ACTIVE'),(12,1,'El Vecino','ACTIVE'),(13,1,'Gil Ramirez D.','ACTIVE'),(14,1,'Hermano Miguel','ACTIVE'),(15,1,'Huayna Cápac','ACTIVE'),(16,1,'Llacao','ACTIVE'),(17,1,'Machángara','ACTIVE'),(18,1,'Molleturo','ACTIVE'),(19,1,'Monay','ACTIVE'),(20,1,'Nulti','ACTIVE'),(21,1,'Octavio C. Palacios','ACTIVE'),(22,1,'Paccha','ACTIVE'),(23,1,'Quingeo','ACTIVE'),(24,1,'Ricaurte','ACTIVE'),(25,1,'San Blás','ACTIVE'),(26,1,'San Joaquín','ACTIVE'),(27,1,'San Sebastián','ACTIVE'),(28,1,'Santa Ana','ACTIVE'),(29,1,'Sayausí','ACTIVE'),(30,1,'Sidcay','ACTIVE'),(31,1,'Sinincay','ACTIVE'),(32,1,'Sucre','ACTIVE'),(33,1,'Tarqui','ACTIVE'),(34,1,'Totoracocha','ACTIVE'),(35,1,'Turi','ACTIVE'),(36,1,'Victoria del Portete','ACTIVE'),(37,1,'Yanuncay','ACTIVE'),(38,2,'Chordeleg','ACTIVE'),(39,2,'La Unión','ACTIVE'),(40,2,'Luis Galarza Orellana','ACTIVE'),(41,2,'Principal','ACTIVE'),(42,2,'San Martín de Puzhio','ACTIVE'),(43,3,'El Pan','ACTIVE'),(44,3,'San Vicente','ACTIVE'),(45,4,'Asunción','ACTIVE'),(46,4,'Girón','ACTIVE'),(47,4,'San Gerardo','ACTIVE'),(48,5,'Guachapala','ACTIVE'),(49,6,'Callasay','ACTIVE'),(50,6,'Daniel Córdova','ACTIVE'),(51,6,'Gualaceo','ACTIVE'),(52,6,'Jadán','ACTIVE'),(53,6,'Luis Cordero','ACTIVE'),(54,6,'Mariano Moreno','ACTIVE'),(55,6,'Remigio Crespo Toral','ACTIVE'),(56,6,'San Juan','ACTIVE'),(57,6,'Simón Bolívar','ACTIVE'),(58,6,'Zhidmad','ACTIVE'),(59,7,'Cochapata','ACTIVE'),(60,7,'El Progreso','ACTIVE'),(61,7,'Las Nieves','ACTIVE'),(62,7,'Nabón','ACTIVE'),(63,8,'Oña','ACTIVE'),(64,8,'Susudel','ACTIVE'),(65,9,'Bulán','ACTIVE'),(66,9,'Chicán','ACTIVE'),(67,9,'Dugdug','ACTIVE'),(68,9,'El Cabo','ACTIVE'),(69,9,'Guarainag','ACTIVE'),(70,9,'Paute','ACTIVE'),(71,9,'San Cristóbal ','ACTIVE'),(72,9,'Tomebamba','ACTIVE'),(73,10,'Ponce Enríquez','ACTIVE'),(74,11,'Pucará','ACTIVE'),(75,11,'San Rafael de Sharug','ACTIVE'),(76,12,'Chumblín','ACTIVE'),(77,12,'San Fernando','ACTIVE'),(78,13,'Abdón Calderón','ACTIVE'),(79,13,'Pijilí','ACTIVE'),(80,13,'Santa Isabel','ACTIVE'),(81,13,'Shaglli','ACTIVE'),(82,14,'Amaluza','ACTIVE'),(83,14,'Palmas','ACTIVE'),(84,14,'Sevilla de Oro','ACTIVE'),(85,15,'Cuchil','ACTIVE'),(86,15,'Guel','ACTIVE'),(87,15,'Jima','ACTIVE'),(88,15,'Ludo','ACTIVE'),(89,15,'San Bartolomé','ACTIVE'),(90,15,'San José de Raranga','ACTIVE'),(91,15,'Sígsig','ACTIVE'),(92,16,'Caluma','ACTIVE'),(93,17,'Chillanes','ACTIVE'),(94,17,'San José del Tambo','ACTIVE'),(95,18,'Asunción','ACTIVE'),(96,18,'Magdalena','ACTIVE'),(97,18,'San José de Chimbo','ACTIVE'),(98,18,'San Sebastián','ACTIVE'),(99,18,'Telimbela','ACTIVE'),(100,19,'Echéandia','ACTIVE'),(101,20,'Ángel Polibio Chávez','ACTIVE'),(102,20,'Facundo Vela','ACTIVE'),(103,20,'Guanujo','ACTIVE'),(104,20,'Ignacio Veintimilla','ACTIVE'),(105,20,'Julio E. Moreno','ACTIVE'),(106,20,'Salinas','ACTIVE'),(107,20,'San Lorenzo','ACTIVE'),(108,20,'San Luis de Pambil','ACTIVE'),(109,20,'San Simón','ACTIVE'),(110,20,'Santa Fé','ACTIVE'),(111,20,'Simiátug','ACTIVE'),(112,21,'Las Mercedes','ACTIVE'),(113,21,'Las Naves','ACTIVE'),(114,22,'Balsapamba','ACTIVE'),(115,22,'Bilován','ACTIVE'),(116,22,'Régulo de Mora','ACTIVE'),(117,22,'San Miguel','ACTIVE'),(118,22,'San Pablo de Atenas','ACTIVE'),(119,22,'San Vicente','ACTIVE'),(120,22,'Santiago','ACTIVE'),(121,23,'Aurelio Bayas','ACTIVE'),(122,23,'Azogues','ACTIVE'),(123,23,'Borrero','ACTIVE'),(124,23,'Cojitambo','ACTIVE'),(125,23,'Guapán','ACTIVE'),(126,23,'Javier Loyola','ACTIVE'),(127,23,'Luis Cordero','ACTIVE'),(128,23,'Pindilig','ACTIVE'),(129,23,'Rivera','ACTIVE'),(130,23,'San Francisco','ACTIVE'),(131,23,'San Miguel','ACTIVE'),(132,23,'Taday','ACTIVE'),(133,24,'Biblián','ACTIVE'),(134,24,'Jerusalén','ACTIVE'),(135,24,'Nazón','ACTIVE'),(136,24,'San Francisco de Sageo','ACTIVE'),(137,24,'Turupamba','ACTIVE'),(138,25,'Cañar','ACTIVE'),(139,25,'Chontamarca','ACTIVE'),(140,25,'Chorocopte','ACTIVE'),(141,25,'Ducur','ACTIVE'),(142,25,'General Morales','ACTIVE'),(143,25,'Gualleturo','ACTIVE'),(144,25,'Honorato Vásquez','ACTIVE'),(145,25,'Ingapirca','ACTIVE'),(146,25,'Juncal','ACTIVE'),(147,25,'San Antonio','ACTIVE'),(148,25,'Ventura','ACTIVE'),(149,25,'Zhud','ACTIVE'),(150,26,'Déleg','ACTIVE'),(151,26,'Solano','ACTIVE'),(152,27,'El Tambo','ACTIVE'),(153,28,'Manuel J. Calle','ACTIVE'),(154,28,'Pancho Negro','ACTIVE'),(155,28,'La Troncal','ACTIVE'),(156,29,'Suscal','ACTIVE'),(157,30,'Bolívar','ACTIVE'),(158,30,'García Moreno','ACTIVE'),(159,30,'Los Andes','ACTIVE'),(160,30,'Monte Olivo','ACTIVE'),(161,30,'San Rafael','ACTIVE'),(162,30,'San Vicente de Pusir','ACTIVE'),(163,31,'27 de Septiembre','ACTIVE'),(164,31,'El Ángel','ACTIVE'),(165,31,'El Goaltal','ACTIVE'),(166,31,'La Libertad','ACTIVE'),(167,31,'San Isidro','ACTIVE'),(168,31,'San Isidro','ACTIVE'),(169,32,'La Concepción','ACTIVE'),(170,32,'Jijón y Caamaño','ACTIVE'),(171,32,'Juan Montalvo','ACTIVE'),(172,32,'Mira','ACTIVE'),(173,33,'Chitán de Navarrete','ACTIVE'),(174,33,'Cristóbal Colón','ACTIVE'),(175,33,'Fernandez Salvador','ACTIVE'),(176,33,'González Suárez','ACTIVE'),(177,33,'La Paz','ACTIVE'),(178,33,'Piartal','ACTIVE'),(179,33,'San Gabriel','ACTIVE'),(180,33,'San José','ACTIVE'),(181,34,'Huaca','ACTIVE'),(182,34,'Mariscal Sucre','ACTIVE'),(183,35,'El Carmelo','ACTIVE'),(184,35,'El Chical','ACTIVE'),(185,35,'González Suárez','ACTIVE'),(186,35,'Julio Andrade','ACTIVE'),(187,35,'Maldonado','ACTIVE'),(188,35,'Pioter','ACTIVE'),(189,35,'Santa Martha','ACTIVE'),(190,35,'Tobar Donoso','ACTIVE'),(191,35,'Tufiño','ACTIVE'),(192,35,'Tulcán','ACTIVE'),(193,35,'Urbina','ACTIVE'),(194,36,'Achupallas','ACTIVE'),(195,36,'Alausí','ACTIVE'),(196,36,'Guasuntos','ACTIVE'),(197,36,'Huigra','ACTIVE'),(198,36,'Multitud','ACTIVE'),(199,36,'Pistishí','ACTIVE'),(200,36,'Pumallacta','ACTIVE'),(201,36,'Sevilla','ACTIVE'),(202,36,'Sibambe','ACTIVE'),(203,36,'Tixán','ACTIVE'),(204,37,'Chambo','ACTIVE'),(205,38,'Capzol','ACTIVE'),(206,38,'Chunchi','ACTIVE'),(207,38,'Compud','ACTIVE'),(208,38,'Gonzol','ACTIVE'),(209,38,'Llagos','ACTIVE'),(210,39,'Cañi','ACTIVE'),(211,39,'Columbe','ACTIVE'),(212,39,'Juan de Velasco','ACTIVE'),(213,39,'Santiago de Quito','ACTIVE'),(214,39,'Sicalpa','ACTIVE'),(215,39,'Villa la Unión','ACTIVE'),(216,40,'Cumandá','ACTIVE'),(217,41,'Cebadas','ACTIVE'),(218,41,'Guamote','ACTIVE'),(219,41,'Palmira','ACTIVE'),(220,42,'El Rosario','ACTIVE'),(221,42,'Guanando','ACTIVE'),(222,42,'Ilapo','ACTIVE'),(223,42,'La Matriz','ACTIVE'),(224,42,'La Pprovidencia','ACTIVE'),(225,42,'San Andrés','ACTIVE'),(226,42,'San Gerardo de Pacaicaguán','ACTIVE'),(227,42,'San Isidro de Patulú','ACTIVE'),(228,42,'San José del Chazo','ACTIVE'),(229,42,'Santa Fé de Galán','ACTIVE'),(230,42,'Valparaíso','ACTIVE'),(231,43,'Pallatanga','ACTIVE'),(232,44,'Bilbao','ACTIVE'),(233,44,'El Altar','ACTIVE'),(234,44,'La Candelaria','ACTIVE'),(235,44,'Matus','ACTIVE'),(236,44,'Penipe','ACTIVE'),(237,44,'Puela','ACTIVE'),(238,44,'San Antonio de Bayushig','ACTIVE'),(239,45,'Cacha','ACTIVE'),(240,45,'Calpi','ACTIVE'),(241,45,'Cubijíes','ACTIVE'),(242,45,'Flores','ACTIVE'),(243,45,'Licán','ACTIVE'),(244,45,'Licto','ACTIVE'),(245,45,'Lizarzaburu','ACTIVE'),(246,45,'Maldonado','ACTIVE'),(247,45,'Pungalá','ACTIVE'),(248,45,'Punín','ACTIVE'),(249,45,'Quimiag','ACTIVE'),(250,45,'San Juan','ACTIVE'),(251,45,'San Luis','ACTIVE'),(252,45,'Velasco','ACTIVE'),(253,45,'Veloz','ACTIVE'),(254,45,'Yaruquíes','ACTIVE'),(255,46,'El Carmen','ACTIVE'),(256,46,'El Triunfo','ACTIVE'),(257,46,'Guasaganda','ACTIVE'),(258,46,'La Maná','ACTIVE'),(259,46,'Pucayacu','ACTIVE'),(260,47,'11 de Noviembre','ACTIVE'),(261,47,'Alaques','ACTIVE'),(262,47,'Belisario Quevedo','ACTIVE'),(263,47,'Eloy Alfaro','ACTIVE'),(264,47,'Guaytacama','ACTIVE'),(265,47,'Ignacio Flores','ACTIVE'),(266,47,'Joseguango Bajo','ACTIVE'),(267,47,'Juan Montalvo','ACTIVE'),(268,47,'La Matriz','ACTIVE'),(269,47,'Mulaló','ACTIVE'),(270,47,'Pastocalle','ACTIVE'),(271,47,'Poaló','ACTIVE'),(272,47,'San Buenaventura','ACTIVE'),(273,47,'Tanicuchí','ACTIVE'),(274,47,'Toacaso','ACTIVE'),(275,48,'El Corazón','ACTIVE'),(276,48,'Moraspungo','ACTIVE'),(277,48,'Pinllopata','ACTIVE'),(278,48,'Ramón Campaña','ACTIVE'),(279,49,'Angamarca','ACTIVE'),(280,49,'Guangaje','ACTIVE'),(281,49,'La Victoria','ACTIVE'),(282,49,'Pilaló','ACTIVE'),(283,49,'Pujilí','ACTIVE'),(284,49,'Tingo','ACTIVE'),(285,49,'Zumbahua','ACTIVE'),(286,50,'Antonio José Holguín','ACTIVE'),(287,50,'Cusubamba','ACTIVE'),(288,50,'Mulalillo','ACTIVE'),(289,50,'Mulliquindil','ACTIVE'),(290,50,'Panzaleo','ACTIVE'),(291,50,'San Miguel','ACTIVE'),(292,51,'Canchagua','ACTIVE'),(293,51,'Chantillín','ACTIVE'),(294,51,'Cochapamba','ACTIVE'),(295,51,'Saquisilí','ACTIVE'),(296,52,'Chugchilán','ACTIVE'),(297,52,'Isinliví','ACTIVE'),(298,52,'La Pampas','ACTIVE'),(299,52,'Palo Quemado','ACTIVE'),(300,52,'Sigchos','ACTIVE'),(301,53,'Arenillas','ACTIVE'),(302,53,'Carcabón','ACTIVE'),(303,53,'Chacras','ACTIVE'),(304,53,'Palmales','ACTIVE'),(305,54,'Ayapamba','ACTIVE'),(306,54,'Cerro Azul','ACTIVE'),(307,54,'Cordoncillo','ACTIVE'),(308,54,'Milagro','ACTIVE'),(309,54,'Paccha','ACTIVE'),(310,54,'San José','ACTIVE'),(311,55,'Bellamaría','ACTIVE'),(312,55,'Balsas','ACTIVE'),(313,56,'Chilla','ACTIVE'),(314,57,'Barbones','ACTIVE'),(315,57,'El Guabo','ACTIVE'),(316,57,'La Iberia','ACTIVE'),(317,57,'Río Bonito','ACTIVE'),(318,57,'Tendales','ACTIVE'),(319,58,'Ecuador','ACTIVE'),(320,58,'EL Paraíso','ACTIVE'),(321,58,'Hualtaco','ACTIVE'),(322,58,'Milton Reyes','ACTIVE'),(323,58,'Unión Lojana','ACTIVE'),(324,59,'EL Paraíso','ACTIVE'),(325,59,'La Libertad','ACTIVE'),(326,59,'La Victoria','ACTIVE'),(327,59,'Platanillos','ACTIVE'),(328,59,'San Isidro','ACTIVE'),(329,59,'Valle Hermoso','ACTIVE'),(330,60,'El Retiro','ACTIVE'),(331,60,'La Providencia','ACTIVE'),(332,60,'Machala','ACTIVE'),(333,60,'Nueve de Mayo','ACTIVE'),(334,60,'Puerto Bolívar','ACTIVE'),(335,60,'El Cambio','ACTIVE'),(336,61,'El Ingenio','ACTIVE'),(337,61,'Marcabelí','ACTIVE'),(338,62,'Bolívar','ACTIVE'),(339,62,'Buena Vista','ACTIVE'),(340,62,'Cañaquemada','ACTIVE'),(341,62,'Casacay','ACTIVE'),(342,62,'El Progreso','ACTIVE'),(343,62,'La Peaña','ACTIVE'),(344,62,'Loma de Franco','ACTIVE'),(345,62,'Ochoa León','ACTIVE'),(346,62,'Tres Cerritos','ACTIVE'),(347,62,'Uzhcurrumi','ACTIVE'),(348,63,'Capiro','ACTIVE'),(349,63,'La Bocana','ACTIVE'),(350,63,'La Susaya','ACTIVE'),(351,63,'Moromoro','ACTIVE'),(352,63,'Piedras','ACTIVE'),(353,63,'Piñas','ACTIVE'),(354,63,'Piñas Grande','ACTIVE'),(355,63,'San Roque','ACTIVE'),(356,63,'Saracay','ACTIVE'),(357,64,'Curtincapa','ACTIVE'),(358,64,'Morales','ACTIVE'),(359,64,'Portovelo','ACTIVE'),(360,64,'Salatí','ACTIVE'),(361,65,'Bellamaría','ACTIVE'),(362,65,'Bellavista','ACTIVE'),(363,65,'La Avanzada','ACTIVE'),(364,65,'San Antonio','ACTIVE'),(365,65,'Torata','ACTIVE'),(366,65,'Jambelí','ACTIVE'),(367,65,'Victoria','ACTIVE'),(368,65,'Puerto Jelí','ACTIVE'),(369,65,'Santa Rosa','ACTIVE'),(370,65,'Nuevo Santa Rosa','ACTIVE'),(371,65,'Jumón','ACTIVE'),(372,65,'Balneario Jambelí','ACTIVE'),(373,66,'Abañín','ACTIVE'),(374,66,'Arcapamba','ACTIVE'),(375,66,'Guanazán','ACTIVE'),(376,66,'Guizaguiña','ACTIVE'),(377,66,'Huertas','ACTIVE'),(378,66,'Malvas','ACTIVE'),(379,66,'Muluncay','ACTIVE'),(380,66,'Salvias','ACTIVE'),(381,66,'Sinsao','ACTIVE'),(382,66,'Zaruma','ACTIVE'),(383,67,'Atacames','ACTIVE'),(384,67,'La Unión','ACTIVE'),(385,67,'Súa','ACTIVE'),(386,67,'Tonchigüe','ACTIVE'),(387,67,'Tonsupa','ACTIVE'),(388,68,'Anchayacu','ACTIVE'),(389,68,'Atahualpa','ACTIVE'),(390,68,'Borbón','ACTIVE'),(391,68,'Colón Eloy de María','ACTIVE'),(392,68,'La Tola','ACTIVE'),(393,68,'Luis Vargas Torres','ACTIVE'),(394,68,'Maldonado','ACTIVE'),(395,68,'Pampanal de Bolívar','ACTIVE'),(396,68,'San Francisco de Onzole','ACTIVE'),(397,68,'San José de Cayapas','ACTIVE'),(398,68,'Santo Domingo de Onzole','ACTIVE'),(399,68,'Selva Alegre','ACTIVE'),(400,68,'Telembí','ACTIVE'),(401,68,'Timbiré','ACTIVE'),(402,68,'Valdez','ACTIVE'),(403,69,'5 de Agosto','ACTIVE'),(404,69,'Bartolomé Ruiz','ACTIVE'),(405,69,'Camarones','ACTIVE'),(406,69,'Carlos Concha','ACTIVE'),(407,69,'Chinca','ACTIVE'),(408,69,'Esmeraldas','ACTIVE'),(409,69,'Luis Tello','ACTIVE'),(410,69,'Majua','ACTIVE'),(411,69,'San Mateo','ACTIVE'),(412,69,'Simón Plata','ACTIVE'),(413,69,'Tabiazo','ACTIVE'),(414,69,'Tachina','ACTIVE'),(415,69,'Vuelta Larga','ACTIVE'),(416,70,'Bolívar','ACTIVE'),(417,70,'Chamanga','ACTIVE'),(418,70,'Daule','ACTIVE'),(419,70,'Galera','ACTIVE'),(420,70,'Muisne','ACTIVE'),(421,70,'Quingue','ACTIVE'),(422,70,'Salima','ACTIVE'),(423,70,'San Francisco','ACTIVE'),(424,70,'San Gregorio','ACTIVE'),(425,71,'Chura','ACTIVE'),(426,71,'Cube','ACTIVE'),(427,71,'La Unión','ACTIVE'),(428,71,'Malimpia','ACTIVE'),(429,71,'Rosa Zárate','ACTIVE'),(430,71,'Viche','ACTIVE'),(431,72,'Chontaduro','ACTIVE'),(432,72,'Chumundé','ACTIVE'),(433,72,'Lagarto','ACTIVE'),(434,72,'Montalvo','ACTIVE'),(435,72,'Rioverde','ACTIVE'),(436,72,'Rocafuerte','ACTIVE'),(437,73,'5 de Junio ','ACTIVE'),(438,73,'Alto Tambo','ACTIVE'),(439,73,'Ancón','ACTIVE'),(440,73,'Cachaví','ACTIVE'),(441,73,'Calderón','ACTIVE'),(442,73,'Carondelet','ACTIVE'),(443,73,'Concepción','ACTIVE'),(444,73,'Mataje','ACTIVE'),(445,73,'San Lorenzo','ACTIVE'),(446,73,'Santa Rita','ACTIVE'),(447,73,'Tambillo','ACTIVE'),(448,73,'Tululbí','ACTIVE'),(449,73,'Urbina','ACTIVE'),(450,74,'Puerto Villamil','ACTIVE'),(451,74,'Tomás de Berlanga','ACTIVE'),(452,75,'El Progreso','ACTIVE'),(453,75,'Isla Floreana','ACTIVE'),(454,75,'Puerto Baquerizo Moreno','ACTIVE'),(455,76,'Bellavista','ACTIVE'),(456,76,'Santa Rosa','ACTIVE'),(457,76,'Puerto Ayora','ACTIVE'),(458,77,'Ayacucho','ACTIVE'),(459,77,'Bolívar','ACTIVE'),(460,77,'Carbo','ACTIVE'),(461,77,'Chongón','ACTIVE'),(462,77,'Febres Cordero','ACTIVE'),(463,77,'García Moreno','ACTIVE'),(464,77,'Gómez Rendón','ACTIVE'),(465,77,'Letamendi','ACTIVE'),(466,77,'Morro','ACTIVE'),(467,77,'Nueve de Octubre','ACTIVE'),(468,77,'Olmedo','ACTIVE'),(469,77,'Pascuales','ACTIVE'),(470,77,'Posorja','ACTIVE'),(471,77,'Puná','ACTIVE'),(472,77,'Roca','ACTIVE'),(473,77,'Rocafuerte','ACTIVE'),(474,77,'Sucre','ACTIVE'),(475,77,'Tarqui','ACTIVE'),(476,77,'Tenguel','ACTIVE'),(477,77,'Urdaneta','ACTIVE'),(478,77,'Ximena','ACTIVE'),(479,78,'Baquerizo Moreno','ACTIVE'),(480,79,'Balao','ACTIVE'),(481,80,'Balzar','ACTIVE'),(482,81,'Banife','ACTIVE'),(483,81,'Daule','ACTIVE'),(484,81,'Emiliano','ACTIVE'),(485,81,'Juan Bautista Aguirre','ACTIVE'),(486,81,'La Aurora','ACTIVE'),(487,81,'Laurel','ACTIVE'),(488,81,'Limonal','ACTIVE'),(489,81,'Los Lojas','ACTIVE'),(490,81,'Magro','ACTIVE'),(491,81,'Santa Clara','ACTIVE'),(492,81,'Vicente Piedrahita','ACTIVE'),(493,82,'Eloy Alfaro','ACTIVE'),(494,82,'El Recreo','ACTIVE'),(495,83,'El Rosario','ACTIVE'),(496,83,'Guayas','ACTIVE'),(497,83,'Velasco Ibarra','ACTIVE'),(498,84,'El Triunfo','ACTIVE'),(499,85,'5 de Junio ','ACTIVE'),(500,85,'Camilo Andrade','ACTIVE'),(501,85,'Chirijos','ACTIVE'),(502,85,'Chobo','ACTIVE'),(503,85,'Enrique Valdez','ACTIVE'),(504,85,'Ernestro Seminario','ACTIVE'),(505,85,'Mariscal Sucre','ACTIVE'),(506,85,'Roberto Astudillo','ACTIVE'),(507,86,'Jesús María','ACTIVE'),(508,86,'Naranjal','ACTIVE'),(509,86,'San Carlos','ACTIVE'),(510,86,'Santa Rosa de Flandes','ACTIVE'),(511,86,'Taura','ACTIVE'),(512,87,'Naranjito','ACTIVE'),(513,88,'Palestina','ACTIVE'),(514,89,'Pedro Carbo','ACTIVE'),(515,89,'Sabanilla','ACTIVE'),(516,89,'Valle de la Virgen','ACTIVE'),(517,90,'La Puntilla','ACTIVE'),(518,90,'Samborondón','ACTIVE'),(519,90,'Tarifa','ACTIVE'),(520,91,'Santa Lucía','ACTIVE'),(521,92,'Bocana','ACTIVE'),(522,92,'Candilejos','ACTIVE'),(523,92,'Central','ACTIVE'),(524,92,'Junquillal','ACTIVE'),(525,92,'La Victoria','ACTIVE'),(526,92,'Paraíso','ACTIVE'),(527,92,'San Mateo','ACTIVE'),(528,92,'Vernaza','ACTIVE'),(529,93,'Pedro Montero','ACTIVE'),(530,93,'Virgen de Fátima','ACTIVE'),(531,93,'Yaguachi','ACTIVE'),(532,93,'Yaguachi Viejo','ACTIVE'),(533,94,'General Villamil','ACTIVE'),(534,95,'Lorenzo De Garaicoa','ACTIVE'),(535,95,'Simón Bolívar','ACTIVE'),(536,96,'Marcelino Maridueña','ACTIVE'),(537,97,'Narcisa de Jesús','ACTIVE'),(538,98,'Lomas de Sargentillo','ACTIVE'),(539,99,'Antonio Elizalde','ACTIVE'),(540,100,'Isidro Ayora','ACTIVE'),(541,101,'Andrade Marín','ACTIVE'),(542,101,'Atuntaqui','ACTIVE'),(543,101,'Chaltura','ACTIVE'),(544,101,'Imbaya','ACTIVE'),(545,101,'Natabuela','ACTIVE'),(546,101,'San Roque','ACTIVE'),(547,102,'6 de Julio','ACTIVE'),(548,102,'Apuela','ACTIVE'),(549,102,'García Moreno','ACTIVE'),(550,102,'Imantag','ACTIVE'),(551,102,'Peñaherrera','ACTIVE'),(552,102,'Plaza Gutiérrez','ACTIVE'),(553,102,'Quiroga','ACTIVE'),(554,102,'Sagrario','ACTIVE'),(555,102,'San Francisco','ACTIVE'),(556,102,'Vacas Galindo','ACTIVE'),(557,103,'Alpachaca','ACTIVE'),(558,103,'Ambuquí','ACTIVE'),(559,103,'Angochagua','ACTIVE'),(560,103,'Caranqui','ACTIVE'),(561,103,'Carolina','ACTIVE'),(562,103,'La Dolorosa','ACTIVE'),(563,103,'La Esperanza','ACTIVE'),(564,103,'Lita','ACTIVE'),(565,103,'Sagrario','ACTIVE'),(566,103,'Salinas','ACTIVE'),(567,103,'San Antonio','ACTIVE'),(568,103,'San Francisco','ACTIVE'),(569,104,'El Jordán','ACTIVE'),(570,104,'Eugenio Espejo','ACTIVE'),(571,104,'González Suárez','ACTIVE'),(572,104,'Ilumán','ACTIVE'),(573,104,'Miguel Egas','ACTIVE'),(574,104,'Pataquí','ACTIVE'),(575,104,'Quichinche','ACTIVE'),(576,104,'San Luis','ACTIVE'),(577,104,'San Pablo','ACTIVE'),(578,104,'San Rafael','ACTIVE'),(579,104,'Selva Alegre','ACTIVE'),(580,105,'Chugá','ACTIVE'),(581,105,'Mariano Acosta','ACTIVE'),(582,105,'Pimampiro','ACTIVE'),(583,105,'Sigsipamba','ACTIVE'),(584,106,'Cahuasquí','ACTIVE'),(585,106,'La Merced de Buenos Aires','ACTIVE'),(586,106,'Pablo Arenas','ACTIVE'),(587,106,'San Blas','ACTIVE'),(588,106,'Tumbabiro','ACTIVE'),(589,106,'Urcuquí','ACTIVE'),(590,107,'Cariamanga','ACTIVE'),(591,107,'Chile','ACTIVE'),(592,107,'Colaisaca','ACTIVE'),(593,107,'El Lucero','ACTIVE'),(594,107,'San Vicente','ACTIVE'),(595,107,'Sanguillín','ACTIVE'),(596,107,'Utuana','ACTIVE'),(597,108,'Catamayo','ACTIVE'),(598,108,'El Tambo','ACTIVE'),(599,108,'Guayquichuma','ACTIVE'),(600,108,'La Bendita','ACTIVE'),(601,108,'San José','ACTIVE'),(602,108,'Zambi','ACTIVE'),(603,109,'Cruzpamba','ACTIVE'),(604,109,'Pózul','ACTIVE'),(605,109,'Sabanilla','ACTIVE'),(606,109,'Maximiliano','ACTIVE'),(607,109,'Celica','ACTIVE'),(608,110,'Amarillos','ACTIVE'),(609,110,'Buena Vista','ACTIVE'),(610,110,'Chaguarpamba','ACTIVE'),(611,110,'El Rosario','ACTIVE'),(612,110,'Santa Rufina','ACTIVE'),(613,111,'27 de Abril','ACTIVE'),(614,111,'Amaluza','ACTIVE'),(615,111,'Bellavista','ACTIVE'),(616,111,'El Airo','ACTIVE'),(617,111,'El Ingenio','ACTIVE'),(618,111,'Jimbura','ACTIVE'),(619,111,'Santa Teresita','ACTIVE'),(620,112,'Changaimina','ACTIVE'),(621,112,'Gonzanamá','ACTIVE'),(622,112,'Nambacola','ACTIVE'),(623,112,'Purunuma','ACTIVE'),(624,112,'Sacapalca','ACTIVE'),(625,113,'Chantaco','ACTIVE'),(626,113,'Chuquiribamba','ACTIVE'),(627,113,'El Cisne','ACTIVE'),(628,113,'El Sagrario','ACTIVE'),(629,113,'Gualel','ACTIVE'),(630,113,'Jimbilla','ACTIVE'),(631,113,'Malacatos','ACTIVE'),(632,113,'Quinara','ACTIVE'),(633,113,'San Lucas','ACTIVE'),(634,113,'San Pedro de Vilcabamba','ACTIVE'),(635,113,'San Sebastián','ACTIVE'),(636,113,'Santiago','ACTIVE'),(637,113,'Sucre','ACTIVE'),(638,113,'Taquil','ACTIVE'),(639,113,'Valle','ACTIVE'),(640,113,'Vilcabamba','ACTIVE'),(641,113,'Yangana','ACTIVE'),(642,114,'Eloy Alfaro','ACTIVE'),(643,114,'La Victoria','ACTIVE'),(644,114,'Larama','ACTIVE'),(645,114,'Macará','ACTIVE'),(646,114,'Sabiango','ACTIVE'),(647,115,'La Tingue','ACTIVE'),(648,115,'Olmedo','ACTIVE'),(649,116,'Cangonamá','ACTIVE'),(650,116,'Casanga','ACTIVE'),(651,116,'Catacocha','ACTIVE'),(652,116,'Guachanamá','ACTIVE'),(653,116,'Lauro Guerrero','ACTIVE'),(654,116,'Lourdes','ACTIVE'),(655,116,'Orianga','ACTIVE'),(656,116,'San Antonio','ACTIVE'),(657,116,'Yamana','ACTIVE'),(658,117,'12 de Diciembre','ACTIVE'),(659,117,'Chanquinal','ACTIVE'),(660,117,'Milagros','ACTIVE'),(661,117,'Pindal','ACTIVE'),(662,118,'Alamor','ACTIVE'),(663,118,'Ciano','ACTIVE'),(664,118,'El Arenal','ACTIVE'),(665,118,'El Limo','ACTIVE'),(666,118,'Mercadillo','ACTIVE'),(667,118,'Vicentino','ACTIVE'),(668,119,'Fundochamba','ACTIVE'),(669,119,'Quilanga','ACTIVE'),(670,119,'San Antonio de las Aradas','ACTIVE'),(671,120,'Celen','ACTIVE'),(672,120,'Lluzhapa','ACTIVE'),(673,120,'Manú','ACTIVE'),(674,120,'San Antonio de Cumbe','ACTIVE'),(675,120,'Saraguro','ACTIVE'),(676,120,'Selva Alegre','ACTIVE'),(677,120,'Sumaypamba','ACTIVE'),(678,120,'Tablón','ACTIVE'),(679,120,'Tenta','ACTIVE'),(680,120,'Urdaneta','ACTIVE'),(681,120,'Yulug','ACTIVE'),(682,121,'Nueva Fátima','ACTIVE'),(683,121,'Sozoranga','ACTIVE'),(684,121,'Tacamoros','ACTIVE'),(685,122,'Bolaspamba','ACTIVE'),(686,122,'Cazaderos','ACTIVE'),(687,122,'Garzareal','ACTIVE'),(688,122,'Limones','ACTIVE'),(689,122,'Mangahurco','ACTIVE'),(690,122,'Paletillas','ACTIVE'),(691,122,'Zapotillo','ACTIVE'),(692,123,'Baba','ACTIVE'),(693,123,'Bejucal','ACTIVE'),(694,123,'Guare','ACTIVE'),(695,124,'Caracol','ACTIVE'),(696,124,'Febres Cordero','ACTIVE'),(697,124,'La Unión','ACTIVE'),(698,124,'Pimocha','ACTIVE'),(699,124,'Matilde Esther','ACTIVE'),(700,124,'Pueblo Nuevo','ACTIVE'),(701,124,'Barreiro','ACTIVE'),(702,124,'Clemente Baquerizo','ACTIVE'),(703,124,'Dr. Camilo Ponce','ACTIVE'),(704,124,'El Salto','ACTIVE'),(705,125,'11 de Octubre','ACTIVE'),(706,125,'7 de Agosto','ACTIVE'),(707,125,'Patricia Pilar','ACTIVE'),(708,125,'San Jacinto de Buana Fé','ACTIVE'),(709,126,'Mocache','ACTIVE'),(710,127,'La Esmeralda','ACTIVE'),(711,127,'Montalvo','ACTIVE'),(712,128,'Palenque','ACTIVE'),(713,129,'Puebloviejo','ACTIVE'),(714,129,'Puerto Pechiche','ACTIVE'),(715,129,'San Juan','ACTIVE'),(716,130,'La Esperanza','ACTIVE'),(717,130,'San Carlos','ACTIVE'),(718,130,'24 de Mayo','ACTIVE'),(719,130,'Guayacán','ACTIVE'),(720,130,'Nicolas Infante','ACTIVE'),(721,130,'Quevedo','ACTIVE'),(722,130,'San Camilo','ACTIVE'),(723,130,'San Cristóbal ','ACTIVE'),(724,130,'7 de Octubre','ACTIVE'),(725,130,'Venus del Río Quevedo','ACTIVE'),(726,130,'Viva Alfaro','ACTIVE'),(727,131,'Quinsaloma','ACTIVE'),(728,132,'Catarama','ACTIVE'),(729,132,'Ricaurte','ACTIVE'),(730,133,'10 de Noviembre','ACTIVE'),(731,133,'Chacarita','ACTIVE'),(732,133,'Los Ángeles','ACTIVE'),(733,133,'Ventanas','ACTIVE'),(734,133,'Zapotal','ACTIVE'),(735,134,'Antonio Sotomayor','ACTIVE'),(736,134,'Bagatela','ACTIVE'),(737,134,'Vinces','ACTIVE'),(738,134,'San Lorenzo','ACTIVE'),(739,134,'Balsar de Vinces','ACTIVE'),(740,135,'La Unión','ACTIVE'),(741,135,'Nueva Unión','ACTIVE'),(742,135,'Valencia','ACTIVE'),(743,136,'Membrillo','ACTIVE'),(744,136,'Quiroga','ACTIVE'),(745,136,'Calceta','ACTIVE'),(746,137,'Boyacá','ACTIVE'),(747,137,'Canuto','ACTIVE'),(748,137,'Chibunga','ACTIVE'),(749,137,'Chone','ACTIVE'),(750,137,'Convento','ACTIVE'),(751,137,'Eloy Alfaro','ACTIVE'),(752,137,'Ricaurte','ACTIVE'),(753,137,'San Antonio','ACTIVE'),(754,137,'Santa Rita','ACTIVE'),(755,138,'4 de Diciembre','ACTIVE'),(756,138,'El Carmen','ACTIVE'),(757,138,'El Maicito','ACTIVE'),(758,138,'San Pedro de Suma','ACTIVE'),(759,139,'Flavio Alfaro','ACTIVE'),(760,139,'San Francisco de Novillo','ACTIVE'),(761,139,'Zapallo','ACTIVE'),(762,140,'Jama','ACTIVE'),(763,141,'América','ACTIVE'),(764,142,'Dr. Miguel Morán Lucio','ACTIVE'),(765,142,'El Anegado','ACTIVE'),(766,142,'Jaramijó','ACTIVE'),(767,142,'Julcuy','ACTIVE'),(768,142,'La Unión','ACTIVE'),(769,142,'Manuel Inocencio Parrales y Guale','ACTIVE'),(770,142,'Membrillal','ACTIVE'),(771,142,'Pedro Pablo Gómez','ACTIVE'),(772,142,'Puerto Cayo','ACTIVE'),(773,142,'San Lorenzo de Jipijapa','ACTIVE'),(774,143,'Junín','ACTIVE'),(775,144,'Eloy Alfaro','ACTIVE'),(776,144,'Los Esteros','ACTIVE'),(777,144,'Manta','ACTIVE'),(778,144,'San Lorenzo','ACTIVE'),(779,144,'San Mateo','ACTIVE'),(780,144,'Santa Marianita','ACTIVE'),(781,144,'Tarqui','ACTIVE'),(782,145,'La Pila','ACTIVE'),(783,145,'Aníbal San Andrés','ACTIVE'),(784,145,'Montecristi','ACTIVE'),(785,145,'El Colorado','ACTIVE'),(786,145,'Eloy Alfaro','ACTIVE'),(787,145,'Leonidas','ACTIVE'),(788,146,'Olmedo','ACTIVE'),(789,147,'Campozano','ACTIVE'),(790,147,'Cascol','ACTIVE'),(791,147,'Guale','ACTIVE'),(792,147,'Lascano','ACTIVE'),(793,147,'Paján','ACTIVE'),(794,148,'10 de Agosto','ACTIVE'),(795,148,'Atahualpa','ACTIVE'),(796,148,'Cojimíes','ACTIVE'),(797,148,'Pedernales','ACTIVE'),(798,149,'Barraganete','ACTIVE'),(799,149,'Pichincha','ACTIVE'),(800,149,'San Sebastián','ACTIVE'),(801,150,'Abdón Calderón','ACTIVE'),(802,150,'Alhajuela','ACTIVE'),(803,150,'Chirijos','ACTIVE'),(804,150,'Crucita','ACTIVE'),(805,150,'Pueblo Nuevo','ACTIVE'),(806,150,'Riochico','ACTIVE'),(807,150,'San Plácido','ACTIVE'),(808,150,'12 de Marzo','ACTIVE'),(809,150,'Andrés de Vera','ACTIVE'),(810,150,'Colón','ACTIVE'),(811,150,'Picoazá','ACTIVE'),(812,150,'Portoviejo','ACTIVE'),(813,150,'San Pablo','ACTIVE'),(814,150,'Francisco Pacheco','ACTIVE'),(815,150,'18 de Octubre','ACTIVE'),(816,150,'Simón Bolívar','ACTIVE'),(817,151,'Machalilla','ACTIVE'),(818,151,'Salango','ACTIVE'),(819,151,'Puerto López','ACTIVE'),(820,152,'Rocafuerte','ACTIVE'),(821,153,'Canoa','ACTIVE'),(822,153,'San Vicente','ACTIVE'),(823,154,'Ayacucho','ACTIVE'),(824,154,'Honorato Vásquez','ACTIVE'),(825,154,'La Unión','ACTIVE'),(826,154,'San Pablo de Pueblo Nuevo','ACTIVE'),(827,154,'Lodana','ACTIVE'),(828,154,'Santa Ana','ACTIVE'),(829,155,'Charapotó','ACTIVE'),(830,155,'San Isidro','ACTIVE'),(831,155,'Bahía de Caráquez','ACTIVE'),(832,155,'Leonidas Plaza','ACTIVE'),(833,156,'Ángel Pedro Giler','ACTIVE'),(834,156,'Bachillero','ACTIVE'),(835,156,'Tosagua','ACTIVE'),(836,157,'Arq. Sixto Durán Ballén','ACTIVE'),(837,157,'Bellavista','ACTIVE'),(838,157,'Noboa','ACTIVE'),(839,157,'Sucre','ACTIVE'),(840,158,'Amazonas','ACTIVE'),(841,158,'Bermejos','ACTIVE'),(842,158,'Bomboiza','ACTIVE'),(843,158,'Chingüinda','ACTIVE'),(844,158,'El Ideal','ACTIVE'),(845,158,'El Rosario','ACTIVE'),(846,158,'Nueva Tarqui','ACTIVE'),(847,158,'San Miguel de Cuyes','ACTIVE'),(848,158,'Gualaquiza','ACTIVE'),(849,158,'Mercedes Molina','ACTIVE'),(850,159,'Chiguaza','ACTIVE'),(851,159,'Huamboya','ACTIVE'),(852,160,'Chiviaza','ACTIVE'),(853,160,'Conchay','ACTIVE'),(854,160,'General Plaza','ACTIVE'),(855,160,'Indanza','ACTIVE'),(856,160,'San Antonio','ACTIVE'),(857,160,'Yunganza','ACTIVE'),(858,161,'Logroño','ACTIVE'),(859,161,'Shimpis','ACTIVE'),(860,161,'Yaupi','ACTIVE'),(861,162,'9 de Octubre','ACTIVE'),(862,162,'Cuchaentza','ACTIVE'),(863,162,'General Proaño','ACTIVE'),(864,162,'Macas','ACTIVE'),(865,162,'Río Blanco','ACTIVE'),(866,162,'San Isidro','ACTIVE'),(867,162,'Sevilla Don Bosco','ACTIVE'),(868,162,'Sinaí','ACTIVE'),(869,162,'Zúñac','ACTIVE'),(870,163,'Pablo Sexto','ACTIVE'),(871,164,'16 de Agosto','ACTIVE'),(872,164,'Arapicos','ACTIVE'),(873,164,'Cumandá','ACTIVE'),(874,164,'Palora','ACTIVE'),(875,164,'Sangay','ACTIVE'),(876,165,'Pan de Azúcar','ACTIVE'),(877,165,'Wakambéis','ACTIVE'),(878,165,'San Carlos de Limón','ACTIVE'),(879,165,'Pananza','ACTIVE'),(880,165,'San Juan Bosco','ACTIVE'),(881,166,'Chinimbimi','ACTIVE'),(882,166,'Chupianza','ACTIVE'),(883,166,'Copal','ACTIVE'),(884,166,'El Acho','ACTIVE'),(885,166,'Patuca','ACTIVE'),(886,166,'Santiago de Méndez','ACTIVE'),(887,166,'Tayuza','ACTIVE'),(888,167,'Asunción','ACTIVE'),(889,167,'Huambi','ACTIVE'),(890,167,'Santa Marianita','ACTIVE'),(891,167,'Sucúa','ACTIVE'),(892,168,'Huasaga','ACTIVE'),(893,168,'Macuma','ACTIVE'),(894,168,'Pumpuentsa','ACTIVE'),(895,168,'Taisha','ACTIVE'),(896,168,'Tuutinentza','ACTIVE'),(897,169,'San José de Morona','ACTIVE'),(898,169,'Tiwintza','ACTIVE'),(899,170,'Archidona','ACTIVE'),(900,170,'Cotundo','ACTIVE'),(901,170,'Ushpayacu','ACTIVE'),(902,171,'Arosemena Tola','ACTIVE'),(903,172,'Díaz de Pineda','ACTIVE'),(904,172,'El Chaco','ACTIVE'),(905,172,'Linares','ACTIVE'),(906,172,'Oyacachi','ACTIVE'),(907,172,'Santa Rosa','ACTIVE'),(908,172,'Sardinas','ACTIVE'),(909,173,'Baeza','ACTIVE'),(910,173,'Borja','ACTIVE'),(911,173,'Cosanga','ACTIVE'),(912,173,'Cuyuja','ACTIVE'),(913,173,'Papallacta','ACTIVE'),(914,173,'Sumaco','ACTIVE'),(915,174,'Ahuano','ACTIVE'),(916,174,'Chontapunta','ACTIVE'),(917,174,'Misahuallí','ACTIVE'),(918,174,'Pano','ACTIVE'),(919,174,'Puerto Napo','ACTIVE'),(920,174,'Talag','ACTIVE'),(921,174,'Tena','ACTIVE'),(922,175,'Augusto Rivadeneira','ACTIVE'),(923,175,'Cononaco','ACTIVE'),(924,175,'Huiririma','ACTIVE'),(925,175,'Nuevo Rocafuerte','ACTIVE'),(926,175,'Tiputini','ACTIVE'),(927,175,'Yasuní','ACTIVE'),(928,176,'Alejandro Labaca','ACTIVE'),(929,176,'Armenia','ACTIVE'),(930,176,'Dayuma','ACTIVE'),(931,176,'El Dorado','ACTIVE'),(932,176,'El Edén','ACTIVE'),(933,176,'García Moreno','ACTIVE'),(934,176,'Guayusa','ACTIVE'),(935,176,'Inés Arango','ACTIVE'),(936,176,'La Belleza','ACTIVE'),(937,176,'Nuevo Paraíso','ACTIVE'),(938,176,'Taracoa','ACTIVE'),(939,177,'Enokanqui','ACTIVE'),(940,177,'La joya de los Sachas','ACTIVE'),(941,177,'Lago San Pedro','ACTIVE'),(942,177,'Pompeya','ACTIVE'),(943,177,'Rumipamba','ACTIVE'),(944,177,'San Carlos','ACTIVE'),(945,177,'San Sebastián del Coca','ACTIVE'),(946,177,'Tres de Noviembre','ACTIVE'),(947,177,'Unión Milagreña','ACTIVE'),(948,178,'Ávila','ACTIVE'),(949,178,'Dahuano','ACTIVE'),(950,178,'Huaticocha','ACTIVE'),(951,178,'Loreto','ACTIVE'),(952,178,'Payamino','ACTIVE'),(953,178,'Puerto Murialdo','ACTIVE'),(954,179,'Arajuno','ACTIVE'),(955,179,'Mera','ACTIVE'),(956,179,'Pastaza','ACTIVE'),(957,179,'Santa Clara','ACTIVE'),(958,180,'Madre Tierra','ACTIVE'),(959,180,'Mera','ACTIVE'),(960,180,'Shell','ACTIVE'),(961,181,'10 de Agosto','ACTIVE'),(962,181,'Canelos','ACTIVE'),(963,181,'El Triunfo','ACTIVE'),(964,181,'Fátima','ACTIVE'),(965,181,'Montalvo','ACTIVE'),(966,181,'Pomona','ACTIVE'),(967,181,'Puyo','ACTIVE'),(968,181,'Río Corrientes','ACTIVE'),(969,181,'Río Tigre','ACTIVE'),(970,181,'Sarayacu','ACTIVE'),(971,181,'Simón Bolívar','ACTIVE'),(972,181,'Tarqui','ACTIVE'),(973,181,'Teniente Hugo Ortíz','ACTIVE'),(974,181,'Veracruz','ACTIVE'),(975,182,'San José','ACTIVE'),(976,182,'Santa Clara','ACTIVE'),(977,183,'Ascázubi','ACTIVE'),(978,183,'Ayora','ACTIVE'),(979,183,'Cangahua','ACTIVE'),(980,183,'Cayambe','ACTIVE'),(981,183,'Cuzubamba','ACTIVE'),(982,183,'Juan Montalvo','ACTIVE'),(983,183,'Olmedo','ACTIVE'),(984,183,'Otón','ACTIVE'),(985,184,'Alóag','ACTIVE'),(986,184,'Aloasí','ACTIVE'),(987,184,'Cutuglahua','ACTIVE'),(988,184,'El Chaupi','ACTIVE'),(989,184,'Machachi','ACTIVE'),(990,184,'Manuel Cornejo Astorga','ACTIVE'),(991,184,'Tambillo','ACTIVE'),(992,184,'Uyumbicho','ACTIVE'),(993,185,'La Esperanza','ACTIVE'),(994,185,'Malchinguí','ACTIVE'),(995,185,'Tabacundo','ACTIVE'),(996,185,'Tocachi','ACTIVE'),(997,185,'Tupigachi','ACTIVE'),(998,186,'Pedro Vicente Maldonado','ACTIVE'),(999,187,'Puerto Quito','ACTIVE'),(1000,188,'Alangasí','ACTIVE'),(1001,188,'Amaguaña','ACTIVE'),(1002,188,'Atahualpa','ACTIVE'),(1003,188,'Belisario Quevedo','ACTIVE'),(1004,188,'Calacalí','ACTIVE'),(1005,188,'Calderón','ACTIVE'),(1006,188,'Carcelén','ACTIVE'),(1007,188,'Centro Histórico','ACTIVE'),(1008,188,'Chavezpamba','ACTIVE'),(1009,188,'Checa','ACTIVE'),(1010,188,'Chilibulo','ACTIVE'),(1011,188,'Chillogallo','ACTIVE'),(1012,188,'Chimbacalle','ACTIVE'),(1013,188,'Cochapamba','ACTIVE'),(1014,188,'Comité del Pueblo','ACTIVE'),(1015,188,'Conocoto','ACTIVE'),(1016,188,'Cotocollao','ACTIVE'),(1017,188,'Cumbayá','ACTIVE'),(1018,188,'El Condado','ACTIVE'),(1019,188,'El Inca','ACTIVE'),(1020,188,'El Quinche','ACTIVE'),(1021,188,'Gualea','ACTIVE'),(1022,188,'Guamaní','ACTIVE'),(1023,188,'Guangopolo','ACTIVE'),(1024,188,'Guayllabamba','ACTIVE'),(1025,188,'Iñaquito','ACTIVE'),(1026,188,'Itchimbía','ACTIVE'),(1027,188,'Jipijapa','ACTIVE'),(1028,188,'Kennedy','ACTIVE'),(1029,188,'La Argelia','ACTIVE'),(1030,188,'La Concepción','ACTIVE'),(1031,188,'La Ecuatoriana','ACTIVE'),(1032,188,'La Ferroviaria','ACTIVE'),(1033,188,'La Libertad','ACTIVE'),(1034,188,'La Magdalena','ACTIVE'),(1035,188,'La Mena','ACTIVE'),(1036,188,'La Merced','ACTIVE'),(1037,188,'Llano Chico','ACTIVE'),(1038,188,'Lloa','ACTIVE'),(1039,188,'Mariscal Sucre','ACTIVE'),(1040,188,'Nanegal','ACTIVE'),(1041,188,'Nanegalito','ACTIVE'),(1042,188,'Nayón','ACTIVE'),(1043,188,'Nono','ACTIVE'),(1044,188,'Pacto','ACTIVE'),(1045,188,'Perucho','ACTIVE'),(1046,188,'Pifo','ACTIVE'),(1047,188,'Píntag','ACTIVE'),(1048,188,'Pomasquí','ACTIVE'),(1049,188,'Ponceano','ACTIVE'),(1050,188,'Puéllaro','ACTIVE'),(1051,188,'Puembo','ACTIVE'),(1052,188,'Puengasí','ACTIVE'),(1053,188,'Quitumbre','ACTIVE'),(1054,188,'Rumipamba','ACTIVE'),(1055,188,'San Antonio','ACTIVE'),(1056,188,'San Bartolo','ACTIVE'),(1057,188,'San José de Minas','ACTIVE'),(1058,188,'San Juan','ACTIVE'),(1059,188,'Solanda','ACTIVE'),(1060,188,'Tababela','ACTIVE'),(1061,188,'Tumbaco','ACTIVE'),(1062,188,'Turubamba','ACTIVE'),(1063,188,'Yaruquí','ACTIVE'),(1064,188,'Zámbiza','ACTIVE'),(1065,189,'Cotogchoa','ACTIVE'),(1066,189,'Rumipamba','ACTIVE'),(1067,189,'San Rafael','ACTIVE'),(1068,189,'Sangolquí','ACTIVE'),(1069,189,'Taboada','ACTIVE'),(1070,190,'Mindo','ACTIVE'),(1071,190,'San Miguel de los Bancos','ACTIVE'),(1072,191,'La Libertad','ACTIVE'),(1073,192,'Anconcito','ACTIVE'),(1074,192,'Carlos Espinoza Larrea','ACTIVE'),(1075,192,'Enríquez Gallo','ACTIVE'),(1076,192,'José Luis Tamayo','ACTIVE'),(1077,192,'Santa Rosa','ACTIVE'),(1078,192,'Vicente Rocafuerte','ACTIVE'),(1079,193,'Ancón','ACTIVE'),(1080,193,'Atahualpa','ACTIVE'),(1081,193,'Ballenita','ACTIVE'),(1082,193,'Chanduy','ACTIVE'),(1083,193,'Colonche','ACTIVE'),(1084,193,'Manglaralto','ACTIVE'),(1085,193,'Santa Elena','ACTIVE'),(1086,193,'Simón Bolívar','ACTIVE'),(1087,194,'Abraham Calazacón','ACTIVE'),(1088,194,'Alluriquín','ACTIVE'),(1089,194,'Bombolí','ACTIVE'),(1090,194,'Chiguilpe','ACTIVE'),(1091,194,'El Esfuerzo','ACTIVE'),(1092,194,'Luz de América','ACTIVE'),(1093,194,'Puerto Limón','ACTIVE'),(1094,194,'Río Toachi','ACTIVE'),(1095,194,'Río Verde','ACTIVE'),(1096,194,'San Jacinto del Búa','ACTIVE'),(1097,194,'Santa María del Toachi','ACTIVE'),(1098,194,'Santo Domingo','ACTIVE'),(1099,194,'Valle Hermoso','ACTIVE'),(1100,194,'Zaracay','ACTIVE'),(1101,195,'La Concordia','ACTIVE'),(1102,195,'Las Villegas','ACTIVE'),(1103,195,'Monterrey','ACTIVE'),(1104,195,'Plan Piloto','ACTIVE'),(1105,196,'El Dorado','ACTIVE'),(1106,196,'Santa Rosa','ACTIVE'),(1107,196,'Sevilla','ACTIVE'),(1108,197,'Aguas Negras','ACTIVE'),(1109,197,'Cuyabeno','ACTIVE'),(1110,197,'Tarapoa','ACTIVE'),(1111,198,'El Reventador','ACTIVE'),(1112,198,'Gonzalo Pizarro','ACTIVE'),(1113,198,'Lumbaqui','ACTIVE'),(1114,198,'Puerto Libre','ACTIVE'),(1115,199,'Dureno','ACTIVE'),(1116,199,'El Eno','ACTIVE'),(1117,199,'General Farfán','ACTIVE'),(1118,199,'Jambelí','ACTIVE'),(1119,199,'Nueva Loja','ACTIVE'),(1120,199,'Pacayacu','ACTIVE'),(1121,199,'Santa Cecilia','ACTIVE'),(1122,200,'Palma Roja','ACTIVE'),(1123,200,'Puerto Bolívar','ACTIVE'),(1124,200,'Puerto El Carmen','ACTIVE'),(1125,200,'Puerto Rodríguez','ACTIVE'),(1126,200,'Santa Elena','ACTIVE'),(1127,201,'Cofanes','ACTIVE'),(1128,201,'Limoncocha','ACTIVE'),(1129,201,'Pañacocha','ACTIVE'),(1130,201,'San Roque','ACTIVE'),(1131,201,'Shushufindi','ACTIVE'),(1132,201,'Siete de Julio','ACTIVE'),(1133,202,'El Playón de San Francisco','ACTIVE'),(1134,202,'La Bonita','ACTIVE'),(1135,202,'La Sofía','ACTIVE'),(1136,202,'Rosa Florida','ACTIVE'),(1137,202,'Santa Bárbara','ACTIVE'),(1138,203,'Ambatillo','ACTIVE'),(1139,203,'Atahualpa','ACTIVE'),(1140,203,'Atocha','ACTIVE'),(1141,203,'Augusto N. Martínez','ACTIVE'),(1142,203,'Celiano Monge','ACTIVE'),(1143,203,'Constantino Fernández','ACTIVE'),(1144,203,'Cunchibamba','ACTIVE'),(1145,203,'Huachi Chico','ACTIVE'),(1146,203,'Huachi Grande','ACTIVE'),(1147,203,'Huachi Loreto','ACTIVE'),(1148,203,'Izamba','ACTIVE'),(1149,203,'Juan Benigno Vela','ACTIVE'),(1150,203,'La Merced','ACTIVE'),(1151,203,'La Península','ACTIVE'),(1152,203,'Matriz','ACTIVE'),(1153,203,'Montalvo','ACTIVE'),(1154,203,'Pasa','ACTIVE'),(1155,203,'Picaigua','ACTIVE'),(1156,203,'Pilahuín','ACTIVE'),(1157,203,'Pinllo','ACTIVE'),(1158,203,'Pishilata','ACTIVE'),(1159,203,'Quisapincha','ACTIVE'),(1160,203,'San Fernando','ACTIVE'),(1161,203,'San Francisco','ACTIVE'),(1162,203,'Santa Rosa','ACTIVE'),(1163,203,'Totoras','ACTIVE'),(1164,203,'Unamuncho','ACTIVE'),(1165,204,'Baños de Agua Santa','ACTIVE'),(1166,204,'Lligua','ACTIVE'),(1167,204,'Río Negro','ACTIVE'),(1168,204,'Río Verde','ACTIVE'),(1169,204,'Ulba','ACTIVE'),(1170,205,'Cevallos','ACTIVE'),(1171,206,'Mocha','ACTIVE'),(1172,206,'Pinguilí','ACTIVE'),(1173,207,'El Triunfo','ACTIVE'),(1174,207,'Los Andes','ACTIVE'),(1175,207,'Patate','ACTIVE'),(1176,207,'Sucre','ACTIVE'),(1177,208,'Benítez','ACTIVE'),(1178,208,'Bolívar','ACTIVE'),(1179,208,'Chiquicha','ACTIVE'),(1180,208,'Cotaló','ACTIVE'),(1181,208,'El Rosario','ACTIVE'),(1182,208,'García Moreno','ACTIVE'),(1183,208,'Guambaló','ACTIVE'),(1184,208,'Pelileo','ACTIVE'),(1185,208,'Pelileo Grande','ACTIVE'),(1186,208,'Salasaca','ACTIVE'),(1187,209,'Baquerizo Moreno','ACTIVE'),(1188,209,'Ciudad Nueva','ACTIVE'),(1189,209,'Emilio María Terán','ACTIVE'),(1190,209,'Marcos Espinel','ACTIVE'),(1191,209,'Píllaro','ACTIVE'),(1192,209,'Poaló','ACTIVE'),(1193,209,'Presidente Urbina','ACTIVE'),(1194,209,'San Andrés','ACTIVE'),(1195,209,'San Miguelito','ACTIVE'),(1196,210,'Quero','ACTIVE'),(1197,210,'Rumipamba','ACTIVE'),(1198,210,'Yanayacu','ACTIVE'),(1199,211,'Quinchicoto','ACTIVE'),(1200,211,'Tisaleo','ACTIVE'),(1201,212,'Panguintza','ACTIVE'),(1202,212,'Zumbi','ACTIVE'),(1203,213,'Chito','ACTIVE'),(1204,213,'El Chorro','ACTIVE'),(1205,213,'La Chonta','ACTIVE'),(1206,213,'Pucapamba','ACTIVE'),(1207,213,'San Andrés','ACTIVE'),(1208,213,'Zumba','ACTIVE'),(1209,214,'El Guisme','ACTIVE'),(1210,214,'El Pangui','ACTIVE'),(1211,214,'Pachicutza','ACTIVE'),(1212,214,'Tundayme','ACTIVE'),(1213,215,'Guayzimi','ACTIVE'),(1214,215,'Nuevo Paraíso','ACTIVE'),(1215,215,'Zurmi','ACTIVE'),(1216,216,'Bellavista','ACTIVE'),(1217,216,'El Porvenir','ACTIVE'),(1218,216,'La Canela','ACTIVE'),(1219,216,'Palanda','ACTIVE'),(1220,216,'Valladolid','ACTIVE'),(1221,217,'Vergel','ACTIVE'),(1222,217,'Nuevo Quito','ACTIVE'),(1223,217,'Paquisha','ACTIVE'),(1224,218,'28 de Mayo','ACTIVE'),(1225,218,'La Paz','ACTIVE'),(1226,218,'Tutupali','ACTIVE'),(1227,219,'Chicaña','ACTIVE'),(1228,219,'Los Encuentros','ACTIVE'),(1229,219,'Yantzaza','ACTIVE'),(1230,220,'Cumbaratza','ACTIVE'),(1231,220,'El Limón','ACTIVE'),(1232,220,'Guadalupe','ACTIVE'),(1233,220,'Imbana','ACTIVE'),(1234,220,'Sabanilla','ACTIVE'),(1235,220,'San Carlos de las Minas','ACTIVE'),(1236,220,'Timbara','ACTIVE'),(1237,220,'Zamora','ACTIVE');
/*!40000 ALTER TABLE `parish` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `payment_agreement_group`
--

DROP TABLE IF EXISTS `payment_agreement_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payment_agreement_group` (
  `serial_pag` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `code_pag` varchar(10) NOT NULL,
  `description_pag` text,
  `status_pag` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_pag`),
  KEY `fk_relationship_292` (`serial_scy`),
  CONSTRAINT `fk_relationship_292` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `payment_agreement_group`
--

LOCK TABLES `payment_agreement_group` WRITE;
/*!40000 ALTER TABLE `payment_agreement_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `payment_agreement_group` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `payment_concept`
--

DROP TABLE IF EXISTS `payment_concept`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payment_concept` (
  `serial_pct` int(11) NOT NULL AUTO_INCREMENT,
  `name_pct` varchar(200) NOT NULL,
  `status_pct` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_pct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `payment_concept`
--

LOCK TABLES `payment_concept` WRITE;
/*!40000 ALTER TABLE `payment_concept` DISABLE KEYS */;
/*!40000 ALTER TABLE `payment_concept` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `payment_concept_group`
--

DROP TABLE IF EXISTS `payment_concept_group`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payment_concept_group` (
  `serial_pcg` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID de la tabla (All new)',
  `name` varchar(100) NOT NULL COMMENT 'Nombre de la agrupaci�n',
  `description` varchar(100) DEFAULT NULL COMMENT 'Descripci�nde la agrupaci�n',
  `status` enum('ACTIVE','INACTIVE') NOT NULL COMMENT 'Estado',
  PRIMARY KEY (`serial_pcg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `payment_concept_group`
--

LOCK TABLES `payment_concept_group` WRITE;
/*!40000 ALTER TABLE `payment_concept_group` DISABLE KEYS */;
/*!40000 ALTER TABLE `payment_concept_group` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `payment_detail`
--

DROP TABLE IF EXISTS `payment_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payment_detail` (
  `serial_pym` int(11) DEFAULT NULL,
  `serial_ccd` int(11) DEFAULT NULL,
  `serial_fin` int(11) DEFAULT NULL,
  `serial_phy` int(11) DEFAULT NULL,
  `serial_usr` int(11) DEFAULT NULL,
  `description_pdt` varchar(128) NOT NULL,
  `document_number_pdt` varchar(128) DEFAULT NULL,
  `amount_pdt` decimal(10,2) NOT NULL,
  `kinship_pdt` varchar(80) DEFAULT NULL,
  `owner_pdt` varchar(300) DEFAULT NULL,
  `date_pdt` date DEFAULT NULL,
  `status_pdt` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_172` (`serial_phy`),
  KEY `fk_relationship_173` (`serial_pym`),
  KEY `fk_relationship_191` (`serial_ccd`),
  KEY `fk_relationship_192` (`serial_fin`),
  KEY `fk_relationship_342` (`serial_usr`),
  CONSTRAINT `fk_relationship_172` FOREIGN KEY (`serial_phy`) REFERENCES `invoice` (`serial_phy`),
  CONSTRAINT `fk_relationship_173` FOREIGN KEY (`serial_pym`) REFERENCES `payment_method` (`serial_pym`),
  CONSTRAINT `fk_relationship_191` FOREIGN KEY (`serial_ccd`) REFERENCES `credit_card` (`serial_ccd`),
  CONSTRAINT `fk_relationship_192` FOREIGN KEY (`serial_fin`) REFERENCES `financial_institution` (`serial_fin`),
  CONSTRAINT `fk_relationship_342` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `payment_detail`
--

LOCK TABLES `payment_detail` WRITE;
/*!40000 ALTER TABLE `payment_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `payment_detail` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `payment_detail_non_academic`
--

DROP TABLE IF EXISTS `payment_detail_non_academic`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payment_detail_non_academic` (
  `serial_ina` int(11) DEFAULT NULL,
  `serial_fin` int(11) DEFAULT NULL,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_ccd` int(11) DEFAULT NULL,
  `serial_pym` int(11) DEFAULT NULL,
  `description_pdn` varchar(128) NOT NULL,
  `document_number_pdn` varchar(128) DEFAULT NULL,
  `amount_pdn` decimal(10,2) NOT NULL,
  `kinship_pdn` varchar(80) DEFAULT NULL,
  `owner_pdn` varchar(300) DEFAULT NULL,
  `date_pdn` date DEFAULT NULL,
  `status_pdn` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_332` (`serial_ina`),
  KEY `fk_relationship_333` (`serial_fin`),
  KEY `fk_relationship_334` (`serial_ccd`),
  KEY `fk_relationship_335` (`serial_pym`),
  KEY `fk_relationship_341` (`serial_usr`),
  CONSTRAINT `fk_relationship_332` FOREIGN KEY (`serial_ina`) REFERENCES `invoice_non_academic` (`serial_ina`),
  CONSTRAINT `fk_relationship_333` FOREIGN KEY (`serial_fin`) REFERENCES `financial_institution` (`serial_fin`),
  CONSTRAINT `fk_relationship_334` FOREIGN KEY (`serial_ccd`) REFERENCES `credit_card` (`serial_ccd`),
  CONSTRAINT `fk_relationship_335` FOREIGN KEY (`serial_pym`) REFERENCES `payment_method` (`serial_pym`),
  CONSTRAINT `fk_relationship_341` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `payment_detail_non_academic`
--

LOCK TABLES `payment_detail_non_academic` WRITE;
/*!40000 ALTER TABLE `payment_detail_non_academic` DISABLE KEYS */;
/*!40000 ALTER TABLE `payment_detail_non_academic` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `payment_method`
--

DROP TABLE IF EXISTS `payment_method`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payment_method` (
  `serial_pym` int(11) NOT NULL AUTO_INCREMENT,
  `name_pym` varchar(128) NOT NULL,
  `requires_owner_info_pym` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `requires_financial_pym` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `requires_credit_card_pym` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `status_pym` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_pym`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `payment_method`
--

LOCK TABLES `payment_method` WRITE;
/*!40000 ALTER TABLE `payment_method` DISABLE KEYS */;
INSERT INTO `payment_method` VALUES (1,'Diferido Corriente','NO','NO','NO','ACTIVE'),(2,'EFECTIVO','NO','NO','NO','ACTIVE'),(3,'CHEQUE','YES','YES','NO','ACTIVE');
/*!40000 ALTER TABLE `payment_method` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `period`
--

DROP TABLE IF EXISTS `period`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `period` (
  `serial_prd` int(11) NOT NULL AUTO_INCREMENT,
  `serial_pgy` int(11) DEFAULT NULL,
  `name_prd` varchar(255) NOT NULL,
  `start_date_prd` date NOT NULL,
  `end_date_prd` date NOT NULL,
  `max_grade_date_prd` date NOT NULL,
  `status_prd` enum('ACTIVE','INACTIVE','BLOCKED','ENDED') NOT NULL DEFAULT 'ACTIVE',
  `min_grade_prd` decimal(8,5) NOT NULL,
  `max_grade_prd` decimal(8,5) NOT NULL,
  `warning_grade_prd` decimal(8,5) NOT NULL,
  `weight_prd` decimal(5,2) NOT NULL,
  PRIMARY KEY (`serial_prd`),
  KEY `fk_periods_by_group` (`serial_pgy`),
  CONSTRAINT `fk_periods_by_group` FOREIGN KEY (`serial_pgy`) REFERENCES `period_group_year` (`serial_pgy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `period`
--

LOCK TABLES `period` WRITE;
/*!40000 ALTER TABLE `period` DISABLE KEYS */;
/*!40000 ALTER TABLE `period` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `period_subject_course_period_trg` BEFORE UPDATE ON `period` FOR EACH ROW BEGIN

	

	IF NEW.status_prd LIKE '%INACTIVE%' THEN

		UPDATE subject_course_period scp

		SET scp.status_scp = 'INACTIVE',

			scp.weight_scp = 0

		WHERE scp.serial_prd = OLD.serial_prd;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `period_exam_grade_change_log`
--

DROP TABLE IF EXISTS `period_exam_grade_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `period_exam_grade_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_spx` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `change_date_sxc` date NOT NULL,
  `last_grade_sxc` decimal(8,5) DEFAULT NULL,
  `comment_sxc` text,
  KEY `fk_relationship_310` (`serial_spx`,`serial_std`),
  KEY `fk_relationship_311` (`serial_usr`),
  KEY `fk_relationship_312` (`serial_chr`),
  CONSTRAINT `fk_relationship_310` FOREIGN KEY (`serial_spx`, `serial_std`) REFERENCES `student_period_exam` (`serial_spx`, `serial_std`),
  CONSTRAINT `fk_relationship_311` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_312` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `period_exam_grade_change_log`
--

LOCK TABLES `period_exam_grade_change_log` WRITE;
/*!40000 ALTER TABLE `period_exam_grade_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `period_exam_grade_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `period_group_year`
--

DROP TABLE IF EXISTS `period_group_year`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `period_group_year` (
  `serial_pgy` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_cpd` int(11) DEFAULT NULL,
  `name_pgy` varchar(255) DEFAULT NULL,
  `status_pgy` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_pgy`),
  KEY `fk_periods_in_year` (`serial_scy`),
  KEY `fk_period_for_year` (`serial_cpd`),
  CONSTRAINT `fk_period_for_year` FOREIGN KEY (`serial_cpd`) REFERENCES `cat_period` (`serial_cpd`),
  CONSTRAINT `fk_periods_in_year` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `period_group_year`
--

LOCK TABLES `period_group_year` WRITE;
/*!40000 ALTER TABLE `period_group_year` DISABLE KEYS */;
/*!40000 ALTER TABLE `period_group_year` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `period_subperiod_subject_skills`
--

DROP TABLE IF EXISTS `period_subperiod_subject_skills`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `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`),
  CONSTRAINT `fk_relationship_serial_prd_psss` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  CONSTRAINT `fk_relationship_serial_sbp_psss` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`),
  CONSTRAINT `fk_relationship_serial_yss_psss` FOREIGN KEY (`serial_yss`) REFERENCES `year_subject_skills` (`serial_yss`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `period_subperiod_subject_skills`
--

LOCK TABLES `period_subperiod_subject_skills` WRITE;
/*!40000 ALTER TABLE `period_subperiod_subject_skills` DISABLE KEYS */;
/*!40000 ALTER TABLE `period_subperiod_subject_skills` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `pre_registration`
--

DROP TABLE IF EXISTS `pre_registration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pre_registration` (
  `serial_prt` int(11) NOT NULL AUTO_INCREMENT,
  `serial_ste` int(11) DEFAULT NULL,
  `serial_nnt` int(11) DEFAULT NULL,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_dgr` int(11) DEFAULT NULL,
  `id_prt` varchar(10) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `first_name_prt` varchar(512) NOT NULL,
  `last_name_prt` varchar(512) NOT NULL,
  `birthdate_prt` date NOT NULL,
  `gender_prt` enum('MALE','FEMALE') NOT NULL,
  `address_prt` text NOT NULL,
  `phone_prt` varchar(30) NOT NULL,
  `first_name_father_prt` varchar(100) DEFAULT NULL,
  `last_name_father_prt` varchar(100) DEFAULT NULL,
  `first_name_mother_prt` varchar(100) DEFAULT NULL,
  `last_name_mother_prt` varchar(100) DEFAULT NULL,
  `city_birth_prt` varchar(100) DEFAULT NULL,
  `blood_type_prt` varchar(10) DEFAULT NULL,
  `allergies_prt` text,
  `lives_with_prt` enum('PARENTS','FATHER','MOTHER','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') DEFAULT NULL,
  `photo_prt` varchar(1024) DEFAULT NULL,
  `email_prt` varchar(256) DEFAULT NULL,
  `rep_first_name_prt` varchar(100) NOT NULL,
  `rep_last_name_prt` varchar(100) NOT NULL,
  `rep_relationship_prt` enum('FATHER','MOTHER','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') NOT NULL,
  `rep_birthdate_prt` date DEFAULT NULL,
  `rep_city_birth_prt` varchar(100) DEFAULT NULL,
  `rep_marital_status_prt` enum('SINGLE','MARRIED','DIVORCED','WIDOWED','UNMARRIED PARTNERS') NOT NULL,
  `rep_occupation_prt` varchar(100) DEFAULT NULL,
  `rep_address_prt` text NOT NULL,
  `rep_phone_prt` varchar(13) NOT NULL,
  `rep_mobile_prt` varchar(13) DEFAULT NULL,
  `rep_company_name_prt` varchar(80) DEFAULT NULL,
  `rep_company_activity_prt` text,
  `rep_company_phone_prt` varchar(13) DEFAULT NULL,
  `rep_photo_prt` varchar(1024) NOT NULL,
  `rep_alumnus_prt` enum('YES','NO') NOT NULL,
  `rep_gender_prt` enum('MALE','FEMALE') NOT NULL,
  `rep_id_prt` varchar(13) NOT NULL,
  `rep_email_prt` varchar(256) DEFAULT NULL,
  `is_listener_prt` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `submitted_docs_prt` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `pre_approved_prt` enum('YES','NO','PENDING') NOT NULL DEFAULT 'PENDING',
  `pre_approved_comment_prt` text,
  `approved_prt` enum('YES','NO','PENDING') NOT NULL DEFAULT 'PENDING',
  `approved_comment_prt` text,
  PRIMARY KEY (`serial_prt`),
  KEY `fk_registered_nationality` (`serial_nnt`),
  KEY `fk_relationship_241` (`serial_ste`),
  KEY `fk_relationship_64` (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_67` (`serial_dgr`),
  KEY `fk_user_register` (`serial_usr`),
  CONSTRAINT `fk_registered_nationality` FOREIGN KEY (`serial_nnt`) REFERENCES `nationality` (`serial_nnt`),
  CONSTRAINT `fk_relationship_241` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`),
  CONSTRAINT `fk_relationship_64` FOREIGN KEY (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year_specialty` (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_67` FOREIGN KEY (`serial_dgr`) REFERENCES `degree` (`serial_dgr`),
  CONSTRAINT `fk_user_register` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `pre_registration`
--

LOCK TABLES `pre_registration` WRITE;
/*!40000 ALTER TABLE `pre_registration` DISABLE KEYS */;
/*!40000 ALTER TABLE `pre_registration` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `pre_registration_period`
--

DROP TABLE IF EXISTS `pre_registration_period`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pre_registration_period` (
  `serial_scy` int(11) DEFAULT NULL,
  `start_date_prp` date NOT NULL,
  `end_date_prp` date NOT NULL,
  `status_prp` enum('ACTIVE','INACTIVE','CLOSED','OPEN') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_73` (`serial_scy`),
  CONSTRAINT `fk_relationship_73` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `pre_registration_period`
--

LOCK TABLES `pre_registration_period` WRITE;
/*!40000 ALTER TABLE `pre_registration_period` DISABLE KEYS */;
/*!40000 ALTER TABLE `pre_registration_period` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `pre_registration_required_documment`
--

DROP TABLE IF EXISTS `pre_registration_required_documment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pre_registration_required_documment` (
  `serial_prt` int(11) DEFAULT NULL,
  `serial_ypd` int(11) DEFAULT NULL,
  `serial_wpr` int(11) DEFAULT NULL,
  `filename_pdc` varchar(500) DEFAULT NULL,
  `status_pdc` enum('PENDING','SUBMITTED') NOT NULL DEFAULT 'PENDING',
  KEY `fk_relationship_263` (`serial_ypd`),
  KEY `fk_relationship_264` (`serial_prt`),
  KEY `fk_relationship_265` (`serial_wpr`),
  CONSTRAINT `fk_relationship_263` FOREIGN KEY (`serial_ypd`) REFERENCES `year_pre_registration_document` (`serial_ypd`),
  CONSTRAINT `fk_relationship_264` FOREIGN KEY (`serial_prt`) REFERENCES `pre_registration` (`serial_prt`),
  CONSTRAINT `fk_relationship_265` FOREIGN KEY (`serial_wpr`) REFERENCES `web_pre_registration` (`serial_wpr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `pre_registration_required_documment`
--

LOCK TABLES `pre_registration_required_documment` WRITE;
/*!40000 ALTER TABLE `pre_registration_required_documment` DISABLE KEYS */;
/*!40000 ALTER TABLE `pre_registration_required_documment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `previous_education_aspirant`
--

DROP TABLE IF EXISTS `previous_education_aspirant`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `previous_education_aspirant` (
  `serial_pred` int(11) NOT NULL AUTO_INCREMENT,
  `serial_asstu` int(11) NOT NULL,
  `serial_sch` int(11) DEFAULT NULL,
  `previous_level_asstu` varchar(45) DEFAULT NULL,
  `previous_year_asstu` int(11) DEFAULT NULL,
  `previous_note_asstu` int(11) DEFAULT NULL,
  `previous_note_disciplien_asstu` int(11) DEFAULT NULL,
  PRIMARY KEY (`serial_pred`),
  KEY `serial_asstu_idx` (`serial_asstu`),
  KEY `fk_serail_school_idx` (`serial_sch`),
  CONSTRAINT `fk_serail_school` FOREIGN KEY (`serial_sch`) REFERENCES `school` (`serial_sch`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_asstu` FOREIGN KEY (`serial_asstu`) REFERENCES `aspirant_student` (`serial_asstu`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `previous_education_aspirant`
--

LOCK TABLES `previous_education_aspirant` WRITE;
/*!40000 ALTER TABLE `previous_education_aspirant` DISABLE KEYS */;
/*!40000 ALTER TABLE `previous_education_aspirant` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `process`
--

DROP TABLE IF EXISTS `process`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `process` (
  `serial_prc` int(11) NOT NULL AUTO_INCREMENT,
  `prc_serial_prc` int(11) DEFAULT NULL,
  `name_prc` varchar(150) NOT NULL,
  `link_prc` varchar(1024) NOT NULL,
  `weight_prc` decimal(5,1) NOT NULL,
  `status_prc` enum('LOCKABLE','NON-LOCKABLE') NOT NULL DEFAULT 'LOCKABLE',
  `id_exclusion` enum('OBL','OPT','ESP','DISCS','DISCT','DISCCD') DEFAULT NULL,
  PRIMARY KEY (`serial_prc`),
  KEY `fk_parent_process` (`prc_serial_prc`),
  CONSTRAINT `fk_parent_process` FOREIGN KEY (`prc_serial_prc`) REFERENCES `process` (`serial_prc`)
) ENGINE=InnoDB AUTO_INCREMENT=395 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `process`
--

LOCK TABLES `process` WRITE;
/*!40000 ALTER TABLE `process` DISABLE KEYS */;
INSERT INTO `process` VALUES (1,NULL,'Parámetros','#',1.0,'LOCKABLE',NULL),(2,1,'Área Académica','#',48.5,'LOCKABLE',NULL),(3,2,'Nueva Área Académica','modules/academic_area/fNewArea',48.6,'LOCKABLE',NULL),(4,2,'Actualizar Área Académica','modules/academic_area/fSearchArea',48.7,'LOCKABLE',NULL),(5,1,'Autoridades','#',5.0,'LOCKABLE',NULL),(6,5,'Nueva Autoridad','modules/authority/fNewAuthority',6.0,'LOCKABLE',NULL),(7,5,'Actualizar Autoridad','modules/authority/fSearchAuthority',7.0,'LOCKABLE',NULL),(8,1,'Cargos de Autoridades','#',4.1,'LOCKABLE',NULL),(9,8,'Nuevo Cargo','modules/authority_charges/fNewCharge',4.2,'LOCKABLE',NULL),(10,8,'Actualizar Cargo','modules/authority_charges/fSearchCharge',4.3,'LOCKABLE',NULL),(11,1,'Perfiles','#',51.5,'LOCKABLE',NULL),(12,11,'Nuevo Perfil','modules/profile/fNewProfile',51.6,'LOCKABLE',NULL),(13,11,'Actualizar Perfil','modules/profile/fSearchProfile',51.7,'LOCKABLE',NULL),(14,1,'Paises','#',14.0,'LOCKABLE',NULL),(15,14,'Nuevo País','modules/country/fNewCountry',15.0,'LOCKABLE',NULL),(16,14,'Actualizar País','modules/country/fSearchCountry',16.0,'LOCKABLE',NULL),(17,1,'Provincias/Estados','#',17.0,'LOCKABLE',NULL),(18,17,'Nueva Provincia/Estado','modules/state/fNewState',18.0,'LOCKABLE',NULL),(19,17,'Actualizar Provincia/Estado','modules/state/fSearchState',19.0,'LOCKABLE',NULL),(20,1,'Secciones','#',20.0,'LOCKABLE',NULL),(21,20,'Nueva Sección','modules/section/fNewSection',21.0,'LOCKABLE',NULL),(22,20,'Actualizar Sección','modules/section/fSearchSection',22.0,'LOCKABLE',NULL),(23,1,'Niveles','#',23.0,'LOCKABLE',NULL),(24,23,'Nuevo Nivel','modules/level/fNewLevel',24.0,'LOCKABLE',NULL),(25,23,'Actualizar Nivel','modules/level/fSearchLevel',25.0,'LOCKABLE',NULL),(26,1,'Especialidades','#',22.5,'LOCKABLE',NULL),(27,26,'Nueva Especialidad','modules/specialty/fNewSpecialty',22.6,'LOCKABLE',NULL),(28,26,'Actualizar Especialidad','modules/specialty/fSearchSpecialty',22.7,'LOCKABLE',NULL),(29,1,'Paralelos','#',29.0,'LOCKABLE',NULL),(30,29,'Nuevo Paralelo','modules/class_group/fNewClassGroup',30.0,'LOCKABLE',NULL),(31,29,'Actualizar Paralelo','modules/class_group/fSearchClassGroup',31.0,'LOCKABLE',NULL),(32,1,'Horas Académicas','#',32.0,'LOCKABLE',NULL),(33,32,'Grupos de Horas','#',33.0,'LOCKABLE',NULL),(34,33,'Nuevo Grupo Horas','modules/group_hour/fNewGroupHour',34.0,'LOCKABLE',NULL),(35,33,'Actualizar Grupo Horas','modules/group_hour/fSearchGroupHour',35.0,'LOCKABLE',NULL),(36,1,'Categoría de Período','#',36.0,'LOCKABLE',NULL),(37,36,'Nueva Categoría','modules/cat_period/fNewCatPeriod',37.0,'LOCKABLE',NULL),(38,36,'Actualizar Categoría','modules/cat_period/fSearchCatPeriod',38.0,'LOCKABLE',NULL),(39,NULL,'Configuración','#',39.0,'LOCKABLE',NULL),(40,39,'Año Lectivo','#',40.0,'LOCKABLE',NULL),(41,40,'Iniciar/Continuar','modules/year_setup/index',41.0,'LOCKABLE',NULL),(42,1,'Año Lectivo','#',19.5,'LOCKABLE',NULL),(43,42,'Nuevo Año Lectivo','modules/school_year/fNewYear',19.6,'LOCKABLE',NULL),(44,42,'Actualizar Año Lectivo','modules/school_year/fSearchYear',19.7,'LOCKABLE',NULL),(46,314,'Nueva Inscripción','modules/pre_registration/fNewPreRegistration',45.0,'LOCKABLE',NULL),(47,314,'Actualizar Inscripción','modules/pre_registration/fSelectPreRegisteredToUpdate',45.1,'LOCKABLE',NULL),(48,321,'Revisar Inscripciones','modules/pre_registration/documents/fSelectLevel',48.0,'LOCKABLE',NULL),(49,1,'Materias','#',49.0,'LOCKABLE',NULL),(50,49,'Nueva Materia','modules/cat_subject/fNewCatSubject',50.0,'LOCKABLE',NULL),(51,49,'Actualizar Materia','modules/cat_subject/fSearchCatSubject',51.0,'LOCKABLE',NULL),(52,NULL,'Usuarios','#',40.0,'LOCKABLE',NULL),(53,52,'Profesores','#',53.0,'LOCKABLE',NULL),(54,53,'Nuevo Profesor','modules/employee/teacher/fNewTeacher',54.0,'LOCKABLE',NULL),(55,53,'Actualizar Profesor','modules/employee/teacher/fSearchTeacher',55.0,'LOCKABLE',NULL),(56,52,'Empleados','#',56.0,'LOCKABLE',NULL),(57,39,'Materias','#',57.0,'LOCKABLE',NULL),(58,57,'Iniciar/Continuar','modules/year_subject_setup/index',58.0,'LOCKABLE',NULL),(59,39,'Profesores','#',59.0,'LOCKABLE',NULL),(60,59,'Horas disponibles por año','modules/teacher_hours_year/fSelectSchoolYear',60.0,'LOCKABLE',NULL),(61,39,'Estudiantes','#',61.0,'LOCKABLE',NULL),(62,61,'Asignar Curso','modules/student/fSelectSchoolYear',62.0,'LOCKABLE',NULL),(63,53,'Asignar Área Académica','modules/employee/teacher/fAssignTeacherToAcademicArea',63.0,'LOCKABLE',NULL),(64,56,'Nuevo Empleado','modules/employee/general/fNewEmployee',64.0,'LOCKABLE',NULL),(65,56,'Actualizar Empleado','modules/employee/general/fSearchEmployee',65.0,'LOCKABLE',NULL),(66,1,'Aulas','#',51.1,'LOCKABLE',NULL),(67,66,'Nueva Aula','modules/classroom/fNewClassroom',67.0,'LOCKABLE',NULL),(68,66,'Actualizar Aula','modules/classroom/fSearchClassroom',68.0,'LOCKABLE',NULL),(69,52,'Asignación de Perfiles','modules/user_profile/fSearchUser',69.0,'LOCKABLE',NULL),(70,1,'Procesos','#',70.0,'LOCKABLE',NULL),(71,70,'Bloquear Procesos','modules/process/fSearchProfileProcess',71.0,'LOCKABLE',NULL),(72,2,'Asignar/Reasignar Director de Area','modules/academic_area/fChangeAcademicAreaDirector',48.8,'LOCKABLE',NULL),(73,52,'Representantes','#',56.1,'LOCKABLE',NULL),(74,73,'Nuevo Representante','modules/guardian/fNewGuardian',74.0,'LOCKABLE',NULL),(75,73,'Actualizar Representante','modules/guardian/fSearchGuardian',75.0,'LOCKABLE',NULL),(76,39,'Preinscripciones','#',76.0,'LOCKABLE',NULL),(77,76,'Periodos de Preinscripción','modules/school_year/fNewPreRegistrationPeriod',77.0,'LOCKABLE',NULL),(78,1,'Transportes','#',51.2,'LOCKABLE',NULL),(79,78,'Conductores','#',79.0,'LOCKABLE',NULL),(80,79,'Nuevo Conductor','modules/bus_driver/fNewBusDriver',80.0,'LOCKABLE',NULL),(81,79,'Actualizar Conductor','modules/bus_driver/fSearchBusDriver',81.0,'LOCKABLE',NULL),(82,78,'Buses','#',82.0,'LOCKABLE',NULL),(83,82,'Nuevo Bus','modules/bus/fNewBus',83.0,'LOCKABLE',NULL),(84,82,'Actualizar Bus','modules/bus/fSearchBus',84.0,'LOCKABLE',NULL),(85,78,'Rutas','#',85.0,'LOCKABLE',NULL),(86,85,'Nueva Ruta','modules/route/fNewRoute',86.0,'LOCKABLE',NULL),(87,85,'Actualizar Ruta','modules/route/fSearchRoute',87.0,'LOCKABLE',NULL),(88,78,'Turnos','#',88.0,'LOCKABLE',NULL),(89,88,'Nuevo Turno','modules/shift/fNewShift',89.0,'LOCKABLE',NULL),(90,88,'Actualizar Turno','modules/shift/fSearchShift',90.0,'LOCKABLE',NULL),(91,1,'Tipos de Actividad','#',49.1,'LOCKABLE',NULL),(92,91,'Nuevo Tipo','modules/activity_type/fNewActivityType',92.0,'LOCKABLE',NULL),(93,91,'Actualizar Tipo','modules/activity_type/fSearchActivityType',93.0,'LOCKABLE',NULL),(94,1,'Criterios de Evaluación','#',49.2,'LOCKABLE',NULL),(95,94,'Nuevo Criterio','modules/grade_criteria/fNewGradeCriteria',95.0,'LOCKABLE',NULL),(96,94,'Actualizar Criterio','modules/grade_criteria/fSearchGradeCriteria',96.0,'LOCKABLE',NULL),(97,39,'Transportes','#',97.0,'LOCKABLE',NULL),(98,97,'Iniciar/Continuar','modules/transportation_setup/fNewTransportationSetup',98.0,'LOCKABLE',NULL),(99,52,'Desactivar Usuario','modules/user/fSearchUser',99.0,'LOCKABLE',NULL),(100,NULL,'Estudiantes','#',100.0,'LOCKABLE',NULL),(101,314,'Documentación de Aprobados','modules/student_documents/fRegisterRequiredDocuments',101.0,'LOCKABLE',NULL),(102,1,'Artículos','#',51.3,'LOCKABLE',NULL),(103,102,'Nuevo Artículo','modules/article/fNewArticle',103.0,'LOCKABLE',NULL),(104,102,'Actualizar Artículo','modules/article/fSearchArticle',104.0,'LOCKABLE',NULL),(105,97,'Asignar Usuarios','modules/transportation_setup/fSelectSchoolYear',105.0,'LOCKABLE',NULL),(106,39,'Criterios y Actividades','#',57.2,'LOCKABLE',NULL),(107,106,'Materias Obligatorias','#',107.0,'LOCKABLE',NULL),(108,107,'Iniciar/Continuar','modules/year_activity_criteria_setup/index',108.0,'LOCKABLE',NULL),(109,106,'Materias Optativas','#',109.0,'LOCKABLE',NULL),(110,109,'Iniciar/Continuar','modules/year_opt_activity_criteria_setup/index',110.0,'LOCKABLE',NULL),(111,1,'Concepto de Pago','#',51.3,'LOCKABLE',NULL),(112,111,'Nuevo Concepto de Pago','modules/payment_concept/fNewPaymentConcept',1.0,'LOCKABLE',NULL),(113,111,'Actualizar Concepto de Pago','modules/payment_concept/fSearchPaymentConcept',2.0,'LOCKABLE',NULL),(114,1,'Impuestos','#',51.4,'LOCKABLE',NULL),(115,114,'Nuevo Impuesto','modules/tax/fNewTax',1.0,'LOCKABLE',NULL),(116,114,'Actualizar Impuesto','modules/tax/fSearchTax',2.0,'LOCKABLE',NULL),(117,39,'Rubros','#',114.0,'LOCKABLE',NULL),(118,117,'Iniciar/Continuar','modules/year_level_specialty_payment_concept/index',1.0,'LOCKABLE',NULL),(122,199,'Calificar Actividad','#',302.0,'LOCKABLE',NULL),(123,199,'Recalificar Actividad','#',134.1,'LOCKABLE',NULL),(126,122,'Materia Obligatoria','modules/student_criteria_grade/fGradeActivityByCourse',1.0,'LOCKABLE',NULL),(127,122,'Materia Optativa','modules/opt_student_criteria_grade/fOptionalSubjectGradeActivityByCourse',2.0,'LOCKABLE',NULL),(130,310,'Ver Actividades','#',134.3,'LOCKABLE',NULL),(131,130,'Materias Obligatorias','modules/student_subject_activity/fSelectSchoolYear ',1.0,'LOCKABLE',NULL),(132,130,'Materias Optativas','modules/student_opt_subject_activity/fSelectSchoolYear',2.0,'LOCKABLE',NULL),(133,61,'Asignar Materia Optativa','modules/student_optional_subject/fSelectSchoolYear',62.5,'LOCKABLE',NULL),(135,199,'Plan de Estudios','modules/syllabus_files/fAssignSyllabusFiles',304.0,'LOCKABLE',NULL),(136,199,'Plan de Estudios Profesores','modules/syllabus_files_change_log/fChangeSyllabusFiles',134.0,'LOCKABLE',NULL),(137,123,'Materia Obligatoria','modules/grade_change_log/fGradeChangeLog',1.0,'LOCKABLE',NULL),(138,123,'Materia Optativa','modules/opt_grade_change_log/fOptGradeChangeLog',1.1,'LOCKABLE',NULL),(139,311,'Pensum de Estudios','modules/student_details/fSyllabusFilesDetail',3.0,'LOCKABLE',NULL),(140,310,'Calendario Actividades','modules/activity/fStudentCalendarActivity',0.5,'LOCKABLE',NULL),(141,310,'Calendario Representante','modules/activity/fGuardianCalendarActivity',0.5,'LOCKABLE',NULL),(142,199,'Calendario Actividades','#',300.0,'LOCKABLE',NULL),(143,365,'Disciplina','#',2.0,'LOCKABLE',NULL),(144,143,'Disciplina General por Parcial','modules/discipline/fDisciplineGeneralGradeSupervisor',1.0,'LOCKABLE',NULL),(145,143,'Disciplina x Tutor x Parcial','modules/student_criteria_grade/fGradeDisciplineByCourseDirectorBySubperiods',1.0,'LOCKABLE',NULL),(147,NULL,'Mensajería','#',147.0,'LOCKABLE',NULL),(148,147,'Bandeja','modules/message/fInbox',1.0,'LOCKABLE',NULL),(149,NULL,'Reportes','#',149.0,'LOCKABLE',NULL),(150,149,'Profesores','#',1.0,'LOCKABLE',NULL),(151,149,'Estudiantes','#',2.0,'LOCKABLE',NULL),(152,150,'Area Académica','modules/reports/employee/teacher/fViewTeachersByArea',1.0,'LOCKABLE',NULL),(153,151,'Lista detallada Curso/Optativa','modules/reports/student/fViewStudentsByCourseOrOptSubject',1.0,'LOCKABLE',NULL),(154,1,'Mensajería','#',69.0,'LOCKABLE',NULL),(155,154,'Configurar Receptor','modules/message/fMessagesBetweenProfiles',1.0,'LOCKABLE',NULL),(156,NULL,'Financiero','#',148.0,'LOCKABLE',NULL),(157,156,'Realizar Cobro','modules/student_year_debts/fSearchStudentForPayingDebts',2.0,'LOCKABLE',NULL),(158,149,'Usuarios','#',3.0,'LOCKABLE',NULL),(159,158,'Ingreso al Sistema','modules/reports/user/fUserAccessLog',1.0,'LOCKABLE',NULL),(161,147,'Enviar Comunicación','modules/message/fSendCommunication',2.0,'LOCKABLE',NULL),(162,1,'Razones de Cambio','#',49.4,'LOCKABLE',NULL),(163,162,'Nueva Razón','modules/change_reason/fNewChangeReason',1.0,'LOCKABLE',NULL),(164,162,'Actualizar Razón','modules/change_reason/fSearchChangeReason',2.0,'LOCKABLE',NULL),(165,39,'Dirigentes de Curso','#',59.1,'LOCKABLE',NULL),(166,165,'Iniciar/Continuar','modules/course_director/fNewCourseDirector',1.0,'LOCKABLE',NULL),(167,39,'Definición de Notas','#',59.1,'LOCKABLE',NULL),(168,167,'Equivalencia de Cualitativas','modules/qualitative_equivalence/fNewQualitativeEquivalence',1.0,'LOCKABLE',NULL),(169,167,'Mínimo de Supletorios','modules/year_resit_exam_ranges/fNewYearResitExamRanges',2.0,'LOCKABLE',NULL),(170,39,'Asignación de aulas','#',59.2,'LOCKABLE',NULL),(171,170,'Iniciar/Continuar','modules/year_subject_classroom/fAssignClassroomsToSubjects',1.0,'LOCKABLE',NULL),(172,52,'Estudiantes','#',56.2,'LOCKABLE',NULL),(173,172,'Actualizar Datos','modules/student/fSelectStudent',1.0,'LOCKABLE',NULL),(174,172,'Actualizar Representantes','modules/student_guardian/fAssignGuardiansToStudent',1.1,'LOCKABLE',NULL),(175,1,'Mantenimiento','#',175.0,'LOCKABLE',NULL),(176,175,'Categoría de Artículos','#',1.0,'LOCKABLE',NULL),(177,176,'Nueva Categoría','modules/item_category/fNewItemCategory',1.0,'LOCKABLE',NULL),(178,176,'Actualizar Categoría','modules/item_category/fSearchItemCategory',1.1,'LOCKABLE',NULL),(179,175,'Proveedores','#',1.1,'LOCKABLE',NULL),(180,179,'Nuevo Proveedor','modules/provider/fNewProvider',1.0,'LOCKABLE',NULL),(181,179,'Actualizar Proveedor','modules/provider/fSearchProvider',1.1,'LOCKABLE',NULL),(182,39,'Materias de Grado','#',182.0,'LOCKABLE',NULL),(183,182,'Definir Materias Disponibles','modules/year_grade_subject/fSelectSchoolYear',1.0,'LOCKABLE',NULL),(184,182,'Selección Materia x Estudiante','modules/grade_subject_score/fSelectSchoolYear',1.1,'LOCKABLE',NULL),(185,39,'Calificaciones Especiales','#',185.0,'LOCKABLE',NULL),(186,185,'Iniciar/Continuar','modules/year_special_grade_setup/index',1.0,'LOCKABLE',NULL),(187,175,'Destinos de Uso','#',3.0,'LOCKABLE',NULL),(188,187,'Nuevo Destino de Uso','modules/use_destination/fNewUseDestination',1.0,'LOCKABLE',NULL),(189,187,'Actualizar Destino de Uso','modules/use_destination/fSearchUseDestination',1.1,'LOCKABLE',NULL),(190,1,'Instituciones Financieras','#',51.3,'LOCKABLE',NULL),(191,190,'Nueva Institución','modules/financial_institution/fNewFinancialInstitution',1.0,'LOCKABLE',NULL),(192,190,'Actualizar Institución','modules/financial_institution/fSearchFinancialInstitution',1.1,'LOCKABLE',NULL),(193,1,'Tarjetas de Crédito','#',51.3,'LOCKABLE',NULL),(194,193,'Nueva Tarjeta','modules/credit_card/fNewCreditCard',1.0,'LOCKABLE',NULL),(195,193,'Actualizar Tarjeta','modules/credit_card/fSearchCreditCard',1.1,'LOCKABLE',NULL),(196,175,'Artículos de Mantenimiento','#',4.0,'LOCKABLE',NULL),(197,196,'Nuevo Artículo','modules/maintenance_item/fNewMaintenanceItem',1.0,'LOCKABLE',NULL),(198,196,'Actualizar Artículo','modules/maintenance_item/fSearchMaintenanceItem',1.1,'LOCKABLE',NULL),(199,NULL,'Gestión Académica','#',45.0,'LOCKABLE',NULL),(200,1,'Materias del Ministerio','#',48.9,'LOCKABLE',NULL),(201,200,'Nueva Materia','modules/ministry_subject/fNewMinistrySubject',1.0,'LOCKABLE',NULL),(202,200,'Actualizar Materia','modules/ministry_subject/fSearchMinistrySubject',2.0,'LOCKABLE',NULL),(203,39,'Materias del Ministerio','#',203.0,'LOCKABLE',NULL),(204,203,'Definir Equivalencias','modules/subject_ministry_equivalence/fNewSubjectMinistryEquivalence',1.0,'LOCKABLE',NULL),(205,199,'Registro de Novedades','#',205.0,'LOCKABLE',NULL),(206,205,'Registrar Novedad','modules/incident/fNewIncident',1.0,'LOCKABLE',NULL),(207,NULL,'Centro Médico','#',207.0,'LOCKABLE',NULL),(208,207,'Registrar Visita','modules/visits_medical_center/fNewVisit',1.0,'LOCKABLE',NULL),(209,142,'Materias Obligatorias','modules/activity/fTeacherCalendarActivity',1.0,'LOCKABLE',NULL),(210,142,'Materias Optativas','modules/opt_activity/fTeacherCalendarOptionalActivity',1.0,'LOCKABLE',NULL),(211,39,'Disciplina','#',211.0,'LOCKABLE',NULL),(212,211,'Modo Calificación x Nivel','modules/level_section_year/fSearchYear',1.0,'LOCKABLE',NULL),(213,147,'Crear Act. General','modules/general_activity/fGeneralCalendarActivity',3.0,'LOCKABLE',NULL),(214,149,'Actividades','#',1.0,'LOCKABLE',NULL),(215,214,'Actividades x Curso o Materia Optativa','modules/reports/activity/fViewActivitiesByCourseOrSubject',1.0,'LOCKABLE',NULL),(216,314,'Selección de Rubros para el Año','modules/student_year_debts/fChooseStudentForSettingDebts',1.0,'LOCKABLE',NULL),(217,156,'Anular Factura','modules/student_year_debts/fSearchInvoiceToVoid',3.0,'LOCKABLE',NULL),(218,199,'Exámenes de Recuperación','#',306.0,'LOCKABLE',NULL),(219,218,'Materias Obligatorias','#',1.0,'LOCKABLE',NULL),(220,219,'Configurar Exámenes','modules/subject_course_retest/fNewSubjectCourseRetest',1.0,'LOCKABLE',NULL),(221,219,'Calififcar Exámenes','modules/subject_course_retest_student/fNewSubjectCourseRetestStudent',2.0,'LOCKABLE',NULL),(222,218,'Materias Optativas','#',2.0,'LOCKABLE',NULL),(223,222,'Configurar Exámenes','modules/optional_subject_retest/fNewOptionalSubjectRetest',1.0,'LOCKABLE',NULL),(224,222,'Calififcar Exámenes','modules/optional_subject_retest_student/fNewOptionalSubjectRetestStudent',2.0,'LOCKABLE',NULL),(225,199,'Supletorios','#',400.0,'LOCKABLE',NULL),(226,225,'Calificar Exámenes','modules/resit_student/fGradeResitExam2013',1.0,'LOCKABLE',NULL),(227,199,'Registro de Hermanos','#',227.0,'LOCKABLE',NULL),(230,1,'Descuentos','#',51.3,'LOCKABLE',NULL),(231,230,'Nuevo Descuento','modules/discount/fNewDiscount',1.0,'LOCKABLE',NULL),(232,230,'Actualizar Descuento','modules/discount/fSearchDiscount',2.0,'LOCKABLE',NULL),(233,39,'Descuentos','#',115.0,'LOCKABLE',NULL),(234,233,'Iniciar/Continuar','modules/year_discount/fAssignYearDiscount',1.0,'LOCKABLE',NULL),(235,1,'Documentos Habilitantes','#',51.3,'LOCKABLE',NULL),(236,235,'Nuevo Documento','modules/qualifying_document/fNewQualifyingDocument',1.0,'LOCKABLE',NULL),(237,235,'Actualizar Documento','modules/qualifying_document/fSearchQualifyingDocument',2.0,'LOCKABLE',NULL),(238,39,'Documentos Requeridos','#',51.3,'LOCKABLE',NULL),(239,238,'Matrícula','modules/year_qualifying_document/fYearQualifyingDocument',2.0,'LOCKABLE',NULL),(240,225,'Determinar Supletorios','modules/resit_student/fSelectLevel',0.1,'LOCKABLE',NULL),(241,199,'Exámenes de Grado','#',225.1,'LOCKABLE',NULL),(242,241,'Calificar Exámenes','modules/grade_subject_score/fSelectSchoolYearToSetScore',1.0,'LOCKABLE',NULL),(244,156,'Asignar Descuentos','modules/student_year_discount_values/fSearchStudentForAssignDiscounts',1.5,'LOCKABLE',NULL),(245,156,'Mantenimiento','#',4.0,'LOCKABLE',NULL),(246,245,'Ingreso de Stock','modules/income_stock/fNewIncomeStock',1.0,'LOCKABLE',NULL),(247,245,'Salida de Stock','modules/stock_request/fNewStockRequest',1.0,'LOCKABLE',NULL),(248,199,'Calendario Actvidades Empleados','modules/employee/general/fActivitiesForEmployee',248.0,'LOCKABLE',NULL),(249,149,'Ministerio','#',4.0,'LOCKABLE',NULL),(250,249,'Contrato de Servicios','modules/reports/ministry/fServiceContract',1.0,'LOCKABLE',NULL),(251,249,'Estudiantes Matriculados','modules/reports/student_matriculated/fViewMatriculatedStudents',2.0,'LOCKABLE',NULL),(252,249,'Acta de Matrícula','modules/reports/ministry/fRegistrationCertificate',3.0,'LOCKABLE',NULL),(253,249,'Acta de Grado','modules/reports/school_certificate/fNewSchoolCertificate',4.0,'LOCKABLE',NULL),(254,167,'Mínimo de Supletorios Ministerio','modules/year_resit_exam_ranges_ministry/fNewYearResitExamRangesMinistry',3.0,'LOCKABLE',NULL),(255,151,'Notas por Período','modules/reports/student_grade/fViewStudentsGradesByPeriod',1.1,'LOCKABLE',NULL),(256,225,'Determinar Supletorios Ministerio','modules/resit_student/fSelectLevelForMinistryResits',0.2,'LOCKABLE',NULL),(257,387,'Orden de Niveles','modules/level_section_year/fDefineLevelOrder',1.0,'LOCKABLE',NULL),(258,249,'Notas Materias de Grado','modules/reports/ministry/fSelectSchoolYearToGradeSubjectReport',5.0,'LOCKABLE',NULL),(259,249,'Certificado de Matrícula','modules/reports/ministry/fSelectSchoolYearToRegistrationRecord',6.0,'LOCKABLE',NULL),(260,249,'Calificaciones Finales','modules/reports/ministry/fViewFinalStudentGrades',7.0,'LOCKABLE',NULL),(261,321,'Preaprobación Inscritos','modules/pre_registration/academic_board/fSelectLevel',49.0,'LOCKABLE',NULL),(262,249,'Exámenes Supletorios','modules/reports/ministry/fResitTestScoreReport',8.0,'LOCKABLE',NULL),(263,52,'Administración General de Usuario','modules/user/fUserGeneralSearch',100.0,'LOCKABLE',NULL),(264,249,'Certificado Notas Finales','modules/reports/ministry/fNewFinalSubjectScores',9.0,'LOCKABLE',NULL),(265,321,'Aprobación Inscritos','modules/pre_registration/principal/fSelectLevel',49.2,'LOCKABLE',NULL),(266,238,'Preinscripción','modules/year_pre_registration_document/fYearPreRegistrationDocument',1.0,'LOCKABLE',NULL),(267,39,'Replicar Configuración de Año','modules/replicate_configuration/fNewReplication',213.0,'LOCKABLE',NULL),(268,1,'Métodos de Pago','#',51.4,'LOCKABLE',NULL),(269,268,'Nuevo Método','modules/payment_method/fNewPaymentMethod',269.0,'LOCKABLE',NULL),(270,268,'Actualizar Método','modules/payment_method/fSearchPaymentMethod',270.0,'LOCKABLE',NULL),(271,52,'Restablecer Contraseña','modules/user/fSearchUserToPasswordReset',271.0,'LOCKABLE',NULL),(273,321,'Nueva Inscripción','modules/pre_registration/school/fNewPreRegistration',47.1,'LOCKABLE',NULL),(274,321,'Actualizar Inscripción','modules/pre_registration/school/fSelectLevel',47.2,'LOCKABLE',NULL),(275,321,'Validar Documentos Requeridos','modules/student_year_document/fStudentYearDocument',49.3,'LOCKABLE',NULL),(277,365,'Registro Asistencia','modules/attendance/fRegisterAttendance',2.0,'LOCKABLE',NULL),(278,199,'Promoción de Estudiantes','modules/studentPromotion/fNewStudentPromotion',278.0,'LOCKABLE',NULL),(279,151,'Lista Simple x Curso','modules/reports/student/fSelectSchoolYearToStudentListByCourse',279.0,'LOCKABLE',NULL),(280,151,'Lista Representates y Representados','modules/reports/guardian/fSelectSchoolYearToGuardiansReport',280.0,'LOCKABLE',NULL),(281,151,'Calificaciones Finales','modules/reports/report_card/fFinalSchoolScores',281.0,'LOCKABLE',NULL),(282,151,'Informe de Evaluación','modules/reports/period_evaluation/fEvaluationReport',282.0,'LOCKABLE',NULL),(283,151,'Lista de Contactos x Curso','modules/reports/contacts_by_student/fStudentsContactsByCourse',283.0,'LOCKABLE',NULL),(284,151,'Lista de Contactos x Estudiante','modules/reports/contacts_by_student/fContactsListByStudent',284.0,'LOCKABLE',NULL),(285,249,'Certificado de Promoción Secundaria','modules/reports/ministry/fYearPromotionCertificate',285.0,'LOCKABLE',NULL),(286,249,'Certificado de Aptitud','modules/reports/ministry/fCertificateOfAttainment',286.0,'LOCKABLE',NULL),(287,NULL,'Biblioteca','#',287.0,'LOCKABLE',NULL),(288,287,'Secciones','#',1.0,'LOCKABLE',NULL),(289,288,'Nueva Sección','modules/library_section/fNewLibrarySection',1.0,'LOCKABLE',NULL),(290,288,'Actualizar Sección','modules/library_section/fSearchLibrarySection',2.0,'LOCKABLE',NULL),(291,287,'Categoría de Libro','#',2.0,'LOCKABLE',NULL),(292,291,'Nueva Categoría','modules/book_category/fNewBookCategory',1.0,'LOCKABLE',NULL),(293,291,'Actualizar Categoría','modules/book_category/fSearchBookCategory',2.0,'LOCKABLE',NULL),(294,287,'Registrar Libro','modules/book/fRegisterBook',3.0,'LOCKABLE',NULL),(295,287,'Busqueda de Libro','modules/loan/fNewBookSearch',4.0,'LOCKABLE',NULL),(296,287,'Prestamos','#',5.0,'LOCKABLE',NULL),(297,296,'Libros','modules/loan/fNewBookLoan',1.0,'LOCKABLE',NULL),(298,296,'Equipos y Aulas','modules/loan/fNewEquipmentOrStudyPlaceLoan',2.0,'LOCKABLE',NULL),(299,287,'Devoluciones','modules/loan_return/fNewLoanReturn',6.0,'LOCKABLE',NULL),(300,351,'Reporte Ficha Médica','modules/reports/medical_file/fMedicalFile',2.0,'LOCKABLE',NULL),(301,287,'Equipos','#',0.1,'LOCKABLE',NULL),(302,301,'Nuevo Equipo','modules/equipment/fNewEquipment',1.0,'LOCKABLE',NULL),(303,301,'Actualizar Equipo','modules/equipment/fSearchEquipment',2.0,'LOCKABLE',NULL),(304,287,'Lugares de estudio','#',0.2,'LOCKABLE',NULL),(305,304,'Nuevo Lugar','modules/study_place/fNewStudyPlace',1.0,'LOCKABLE',NULL),(306,304,'Actualizar Lugar','modules/study_place/fSearchStudyPlace',2.0,'LOCKABLE',NULL),(307,39,'Horarios','#',59.3,'LOCKABLE',NULL),(308,39,'Arrancar Año Lectivo','modules/school_year/fStartSchoolYear',211.5,'LOCKABLE',NULL),(309,NULL,'Desempeño Escolar','#',0.1,'LOCKABLE',NULL),(310,NULL,'Agenda','#',0.1,'LOCKABLE',NULL),(311,NULL,'Información General','#',0.1,'LOCKABLE',NULL),(312,NULL,'Estado de Cuenta','#',0.1,'LOCKABLE',NULL),(314,NULL,'Inscripciones','#',0.1,'LOCKABLE',NULL),(315,309,'Calificaciones','modules/student_details/fGradesByStudent',1.0,'LOCKABLE',NULL),(316,309,'Asistencia','modules/student_details/fAttendanceDetail',2.0,'LOCKABLE',NULL),(317,311,'Compañeros','modules/student_details/fClassmateDetail',1.0,'LOCKABLE',NULL),(318,311,'Transporte','modules/student_details/fTransportationDetail',2.0,'LOCKABLE',NULL),(319,311,'Horario','modules/student_details/fScheduleDetail',4.0,'LOCKABLE',NULL),(320,312,'Ver Cuenta','modules/guardian/account_balance/fViewAccountBalance',1.0,'LOCKABLE',NULL),(321,52,'Proceso de Inscripción','#',103.0,'LOCKABLE',NULL),(324,156,'Venta de Artículos','modules/student_year_debts/fSearchStudentForShopping',3.0,'LOCKABLE',NULL),(325,321,'Selección de rubros','modules/student_year_debts/fChooseStudentForOptionalDebts',49.4,'LOCKABLE',NULL),(326,52,'Inscripción Directa','modules/registration/fNewRegistrationR',102.0,'LOCKABLE',NULL),(327,149,'Colegio','#',327.0,'LOCKABLE',NULL),(328,327,'Valores Pagados','modules/reports/payed_debts/fViewPayedDebts',1.0,'LOCKABLE',NULL),(329,327,'Notas Finales','modules/reports/student_grade/fViewFinalStudentsGrades',2.0,'LOCKABLE',NULL),(330,1,'Grupos de Convenio de Pago','#',330.0,'LOCKABLE',NULL),(331,330,'Nuevo Grupo','modules/payment_agreement_group/fNewPaymentAgreementGroup',1.0,'LOCKABLE',NULL),(332,330,'Actualizar Grupo','modules/payment_agreement_group/fSearchPaymentAgreementGroup',2.0,'LOCKABLE',NULL),(333,156,'Asignar Convenio de Pago','modules/payment_agreement_group/fSelectSchoolYearToAssignPaymentAgreement',3.2,'LOCKABLE',NULL),(334,327,'Facturas Sin Pagar','modules/reports/unpayed_debts/fViewUnpayedDebts',3.0,'LOCKABLE',NULL),(335,327,'Estudiantes por Rubro','modules/reports/students_by_debts/fSelectSchoolYearToStudentsByDebtsReport',4.0,'LOCKABLE',NULL),(336,321,'Verificación de Pagos Habilitantes','modules/student_year_mandatory_payment/fCheckPaymentByStudent',336.0,'LOCKABLE',NULL),(337,147,'Premiación Alumnos Destacados','modules/top_students_awards/fNewTopStudentsAwards',4.0,'LOCKABLE',NULL),(338,149,'Acta de Compromiso','modules/reports/letter_of_commitment/fLetterOfCommitment',5.0,'LOCKABLE',NULL),(339,287,'Registrar ejemplar de Libro','modules/book/fRegisterBookCopy',3.1,'LOCKABLE',NULL),(340,156,'Cambiar Nombre Facturas','modules/invoice/fChooseStudentToChangeInvoiceData',3.1,'LOCKABLE',NULL),(341,156,'Impresión Facturas en Bloque ','modules/invoice/fSelectSchoolYearToPrintInvoices',3.2,'LOCKABLE',NULL),(342,327,'Acta Matrícula','modules/reports/school_certificate/fRegistrationCertificate',0.1,'LOCKABLE',NULL),(343,61,'Cambio de Paralelo','modules/class_group/fChangeStudentClassGroup',62.6,'LOCKABLE',NULL),(344,156,'Registro corriente diferido','modules/student_year_debts/fSearchStudentForCurrentDeferred',2.1,'LOCKABLE',NULL),(345,156,'Impresión de Factura','modules/invoice/fSelectSchoolYearToPrintInvoice',3.2,'LOCKABLE',NULL),(346,156,'Selección Rubros Adicionales','modules/student_year_debts/fChooseStudentForOptionalDebts',1.0,'LOCKABLE',NULL),(347,61,'Cambio de Nivel/Especialidad','modules/level/fChangeStudentLevel',62.7,'LOCKABLE',NULL),(348,207,'Visitantes','#',2.0,'LOCKABLE',NULL),(349,348,'Nuevo Visitante','modules/guest/fNewGuest',1.0,'LOCKABLE',NULL),(350,348,'Actualizar Visitante','modules/guest/fSearchGuest',2.0,'LOCKABLE',NULL),(351,207,'Ficha Médica','#',62.7,'LOCKABLE',NULL),(352,351,'Nueva/Actualizar','modules/medical_file/fSelectPatient',1.0,'LOCKABLE',NULL),(353,1,'Destrezas','#',49.3,'LOCKABLE',NULL),(354,353,'Nueva Destreza','modules/skills/fNewSkill',1.0,'LOCKABLE',NULL),(355,353,'Actualizar Destreza','modules/skills/fSearchSkill',2.0,'LOCKABLE',NULL),(356,39,'Observaciones Académicas Por Nivel','modules/user_course_comment_setup/fUserCourseCommentSetup',40.2,'LOCKABLE',NULL),(357,307,'Configuración Manual','modules/schedule/fScheduleDefinition',1.0,'LOCKABLE',NULL),(358,307,'Generación Automática','#',2.0,'LOCKABLE',NULL),(359,358,'Ejecutar Proceso','modules/schedule/fAutoScheduleDefinition',1.0,'LOCKABLE',NULL),(360,358,'Selección de Resultados','',2.0,'LOCKABLE',NULL),(361,199,'Registro de Observaciones Académicas','modules/user_course_comment_setup/fSetCommentByCourse',135.0,'LOCKABLE',NULL),(362,39,'Ver Configuración Actual','modules/school_year/fViewCurrentConfiguration',212.0,'LOCKABLE',NULL),(363,199,'Examen por Periodo','#',226.0,'LOCKABLE',NULL),(364,363,'Calificar Examen','modules/student_period_exam/fGradePeriodExam',1.0,'LOCKABLE',NULL),(365,NULL,'Asistencia y Disciplina','#',47.0,'LOCKABLE',NULL),(366,40,'Habilitar Proceso Matriculación','modules/school_year/fSelectYearToRegistrationWizard',45.0,'LOCKABLE',NULL),(367,39,'Destrezas','#',57.3,'LOCKABLE',NULL),(368,367,'Iniciar/Continuar','modules/year_skill_setup/index',1.0,'LOCKABLE',NULL),(369,199,'Destrezas','#',369.0,'LOCKABLE',NULL),(370,369,'Calificar Destrezas','modules/year_skill_setup/fGradeSkillCriteria',369.0,'LOCKABLE',NULL),(371,151,'Notas por Período','modules/reports/grade_period_report/fViewStudentsGradesByPeriod',1.2,'LOCKABLE',NULL),(372,193,'Asignar Institución Financiera','modules/financial_institution_card/fAssignCreditCardToFinancialInstitution',1.2,'LOCKABLE',NULL),(373,199,'Observaciones por Estudiante','modules/user_course_comment_setup/fSetCommentByCourse',373.0,'LOCKABLE',NULL),(374,199,'Habilitar Estudiantes Promovidos','modules/student_year/fEnablePromotedStudents',374.0,'LOCKABLE',NULL),(375,117,'Desasignar','modules/year_level_specialty_payment_concept/fDisablePaymentConcept',375.0,'LOCKABLE',NULL),(376,151,'Lista de Estudiantes y Representantes','modules/reports/guardian/fSelectSchoolYearToGuardiansReportByStudents',284.5,'LOCKABLE',NULL),(377,142,'Director de Area','modules/activity/fAreaDirectorCalendarActivity',1.5,'LOCKABLE',NULL),(378,151,'Promedio por Periodo por Curso','modules/authority_views/fStudentCourseScores',1.3,'LOCKABLE',NULL),(379,151,'Detalle de Notas x Estudiante','modules/authority_views/fGradesByStudent',284.6,'LOCKABLE',NULL),(380,249,'Calificaciones x Periodo','modules/reports/ministry/fViewAllStudentGradesByPeriod',10.0,'LOCKABLE',NULL),(381,203,'Definir Orden Materias Ministerio','modules/ministry_subject/fSetMinistrySubjectOrderByCourse',5.0,'LOCKABLE',NULL),(382,151,'Calificaciones Acumuladas','modules/reports/student_grade/fAccumulatedGradeReport',300.0,'LOCKABLE',NULL),(383,225,'Calificar Supletorios del Ministerio','modules/ministry_resit_student/fSelectSchoolYearToSetResitScore',99.0,'LOCKABLE',NULL),(384,249,'Calificaciones Finales Primaria','modules/reports/ministry/fViewFinalStudentGrades_Antares',7.5,'LOCKABLE',NULL),(385,249,'Certificado de Promoción Primaria','modules/reports/ministry/fYearPromotionCertificateSchool',285.5,'LOCKABLE',NULL),(386,151,'Informe de Evaluación Final','modules/reports/student_grade/fFinalEvaluationReport',282.5,'LOCKABLE',NULL),(387,39,'Niveles','#',40.1,'LOCKABLE',NULL),(388,387,'Equivalencia Niveles Ministerio','modules/level_section_year/fLevelSectionYearMinistryName',2.0,'LOCKABLE',NULL),(389,199,'Parciales','#',134.5,'LOCKABLE',NULL),(390,389,'Bloqueo/Desbloqueo Parciales','modules/process/fBlockSubperiods',1.0,'LOCKABLE',NULL),(391,151,'Promedio por Subperido por Curso','modules/authority_views/fStudentCourseScoresSubperiods',1.5,'LOCKABLE',NULL),(392,363,'Re - calificar Examen','modules/student_period_exam/fReGradePeriodExam',2.0,'LOCKABLE',NULL),(393,151,'Informe de Evaluación Parciales','modules/reports/grade_period_report/fViewStudentsGradesBySubperiod',282.7,'LOCKABLE',NULL),(394,150,'Control Ingreso de Notas','modules/reports/activity_by_teacher/fActivityTypesByTeachers',2.0,'LOCKABLE',NULL);
/*!40000 ALTER TABLE `process` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection  = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = '' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `profile_process_trg`



AFTER INSERT ON `process`



FOR EACH ROW



BEGIN



        



    INSERT INTO profile_process 



    VALUES (1,NEW.serial_prc,'ACTIVE');    



    



END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `profile`
--

DROP TABLE IF EXISTS `profile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `profile` (
  `serial_prf` int(11) NOT NULL AUTO_INCREMENT,
  `name_prf` varchar(150) NOT NULL,
  `type_prf` enum('INTERNAL','EXTERNAL') NOT NULL,
  `status_prf` enum('ACTIVE','INACTIVE') NOT NULL,
  `owner_prf` enum('SYSTEM','USER') NOT NULL DEFAULT 'USER',
  PRIMARY KEY (`serial_prf`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `profile`
--

LOCK TABLES `profile` WRITE;
/*!40000 ALTER TABLE `profile` DISABLE KEYS */;
INSERT INTO `profile` VALUES (1,'Administrador','INTERNAL','ACTIVE','SYSTEM'),(2,'Representante','EXTERNAL','ACTIVE','SYSTEM'),(3,'Estudiante','EXTERNAL','ACTIVE','SYSTEM'),(4,'Docente','INTERNAL','ACTIVE','SYSTEM'),(5,'Administrativo','INTERNAL','ACTIVE','SYSTEM');
/*!40000 ALTER TABLE `profile` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `profile_status_trg` BEFORE UPDATE ON `profile` FOR EACH ROW BEGIN

	

	IF NEW.status_prf = 'INACTIVE' THEN

		UPDATE user_profile upr

		SET upr.status_upr = 'INACTIVE'

		WHERE upr.serial_prf = OLD.serial_prf;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `profile_process`
--

DROP TABLE IF EXISTS `profile_process`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `profile_process` (
  `serial_prf` int(11) DEFAULT NULL,
  `serial_prc` int(11) DEFAULT NULL,
  `status_ppr` enum('ACTIVE','BLOCKED') DEFAULT 'ACTIVE',
  KEY `fk_has_process` (`serial_prf`),
  KEY `fk_in_profile` (`serial_prc`),
  CONSTRAINT `fk_has_process` FOREIGN KEY (`serial_prf`) REFERENCES `profile` (`serial_prf`),
  CONSTRAINT `fk_in_profile` FOREIGN KEY (`serial_prc`) REFERENCES `process` (`serial_prc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `profile_process`
--

LOCK TABLES `profile_process` WRITE;
/*!40000 ALTER TABLE `profile_process` DISABLE KEYS */;
INSERT INTO `profile_process` VALUES (1,1,'ACTIVE'),(1,2,'ACTIVE'),(1,3,'ACTIVE'),(1,4,'ACTIVE'),(1,5,'ACTIVE'),(1,6,'ACTIVE'),(1,7,'ACTIVE'),(1,8,'ACTIVE'),(1,9,'ACTIVE'),(1,10,'ACTIVE'),(1,11,'ACTIVE'),(1,12,'ACTIVE'),(1,13,'ACTIVE'),(1,14,'ACTIVE'),(1,15,'ACTIVE'),(1,16,'ACTIVE'),(1,17,'ACTIVE'),(1,18,'ACTIVE'),(1,19,'ACTIVE'),(1,20,'ACTIVE'),(1,21,'ACTIVE'),(1,22,'ACTIVE'),(1,23,'ACTIVE'),(1,24,'ACTIVE'),(1,25,'ACTIVE'),(1,26,'ACTIVE'),(1,27,'ACTIVE'),(1,28,'ACTIVE'),(1,29,'ACTIVE'),(1,30,'ACTIVE'),(1,31,'ACTIVE'),(1,32,'ACTIVE'),(1,33,'ACTIVE'),(1,34,'ACTIVE'),(1,35,'ACTIVE'),(1,36,'ACTIVE'),(1,37,'ACTIVE'),(1,38,'ACTIVE'),(1,39,'ACTIVE'),(1,40,'ACTIVE'),(1,41,'ACTIVE'),(1,42,'ACTIVE'),(1,43,'ACTIVE'),(1,44,'ACTIVE'),(1,48,'ACTIVE'),(1,49,'ACTIVE'),(1,50,'ACTIVE'),(1,51,'ACTIVE'),(1,52,'ACTIVE'),(1,54,'ACTIVE'),(1,55,'ACTIVE'),(1,56,'ACTIVE'),(1,57,'ACTIVE'),(1,58,'ACTIVE'),(1,59,'ACTIVE'),(1,60,'ACTIVE'),(1,61,'ACTIVE'),(1,62,'ACTIVE'),(1,63,'ACTIVE'),(1,64,'ACTIVE'),(1,65,'ACTIVE'),(1,66,'ACTIVE'),(1,67,'ACTIVE'),(1,68,'ACTIVE'),(1,69,'ACTIVE'),(1,70,'ACTIVE'),(1,71,'ACTIVE'),(1,72,'ACTIVE'),(1,74,'ACTIVE'),(1,75,'ACTIVE'),(1,77,'ACTIVE'),(1,80,'ACTIVE'),(1,81,'ACTIVE'),(1,83,'ACTIVE'),(1,84,'ACTIVE'),(1,86,'ACTIVE'),(1,87,'ACTIVE'),(1,89,'ACTIVE'),(1,90,'ACTIVE'),(1,92,'ACTIVE'),(1,93,'ACTIVE'),(1,95,'ACTIVE'),(1,96,'ACTIVE'),(1,98,'ACTIVE'),(1,99,'ACTIVE'),(1,103,'ACTIVE'),(1,104,'ACTIVE'),(1,105,'ACTIVE'),(1,107,'ACTIVE'),(1,108,'ACTIVE'),(1,109,'ACTIVE'),(1,110,'ACTIVE'),(1,111,'ACTIVE'),(1,112,'ACTIVE'),(1,113,'ACTIVE'),(1,114,'ACTIVE'),(1,115,'ACTIVE'),(1,116,'ACTIVE'),(1,117,'ACTIVE'),(1,118,'ACTIVE'),(1,133,'ACTIVE'),(1,136,'ACTIVE'),(1,137,'ACTIVE'),(1,138,'ACTIVE'),(1,144,'ACTIVE'),(1,148,'ACTIVE'),(1,152,'ACTIVE'),(1,153,'ACTIVE'),(1,155,'ACTIVE'),(1,157,'ACTIVE'),(1,159,'ACTIVE'),(1,161,'ACTIVE'),(1,163,'ACTIVE'),(1,164,'ACTIVE'),(1,166,'ACTIVE'),(1,168,'ACTIVE'),(1,169,'ACTIVE'),(1,171,'ACTIVE'),(1,173,'ACTIVE'),(1,174,'ACTIVE'),(1,177,'ACTIVE'),(1,178,'ACTIVE'),(1,180,'ACTIVE'),(1,181,'ACTIVE'),(1,183,'ACTIVE'),(1,184,'ACTIVE'),(1,186,'ACTIVE'),(1,188,'ACTIVE'),(1,189,'ACTIVE'),(1,191,'ACTIVE'),(1,192,'ACTIVE'),(1,194,'ACTIVE'),(1,195,'ACTIVE'),(1,197,'ACTIVE'),(1,198,'ACTIVE'),(1,201,'ACTIVE'),(1,202,'ACTIVE'),(1,204,'ACTIVE'),(1,206,'ACTIVE'),(1,208,'ACTIVE'),(1,212,'ACTIVE'),(1,213,'ACTIVE'),(1,215,'ACTIVE'),(1,217,'ACTIVE'),(1,231,'ACTIVE'),(1,232,'ACTIVE'),(1,234,'ACTIVE'),(1,236,'ACTIVE'),(1,237,'ACTIVE'),(1,239,'ACTIVE'),(1,240,'ACTIVE'),(1,242,'ACTIVE'),(1,244,'ACTIVE'),(1,246,'ACTIVE'),(1,247,'ACTIVE'),(1,250,'ACTIVE'),(1,251,'ACTIVE'),(1,252,'ACTIVE'),(1,253,'ACTIVE'),(1,254,'ACTIVE'),(1,255,'ACTIVE'),(1,256,'ACTIVE'),(1,257,'ACTIVE'),(1,258,'ACTIVE'),(1,259,'ACTIVE'),(1,260,'ACTIVE'),(1,261,'ACTIVE'),(1,262,'ACTIVE'),(1,263,'ACTIVE'),(1,264,'ACTIVE'),(1,265,'ACTIVE'),(1,266,'ACTIVE'),(1,267,'ACTIVE'),(1,269,'ACTIVE'),(1,270,'ACTIVE'),(1,271,'ACTIVE'),(1,273,'ACTIVE'),(1,274,'ACTIVE'),(1,275,'ACTIVE'),(1,277,'ACTIVE'),(1,278,'ACTIVE'),(1,279,'ACTIVE'),(1,280,'ACTIVE'),(1,281,'ACTIVE'),(1,282,'ACTIVE'),(1,283,'ACTIVE'),(1,284,'ACTIVE'),(1,285,'ACTIVE'),(1,286,'ACTIVE'),(1,289,'ACTIVE'),(1,290,'ACTIVE'),(1,292,'ACTIVE'),(1,293,'ACTIVE'),(1,294,'ACTIVE'),(1,295,'ACTIVE'),(1,297,'ACTIVE'),(1,298,'ACTIVE'),(1,299,'ACTIVE'),(1,300,'ACTIVE'),(1,302,'ACTIVE'),(1,303,'ACTIVE'),(1,305,'ACTIVE'),(1,306,'ACTIVE'),(1,308,'ACTIVE'),(1,324,'ACTIVE'),(1,325,'ACTIVE'),(1,326,'ACTIVE'),(1,328,'ACTIVE'),(1,329,'ACTIVE'),(1,331,'ACTIVE'),(1,332,'ACTIVE'),(1,333,'ACTIVE'),(1,334,'ACTIVE'),(1,335,'ACTIVE'),(1,336,'ACTIVE'),(1,337,'ACTIVE'),(1,338,'ACTIVE'),(1,339,'ACTIVE'),(1,340,'ACTIVE'),(1,341,'ACTIVE'),(1,342,'ACTIVE'),(1,343,'ACTIVE'),(1,344,'ACTIVE'),(1,345,'ACTIVE'),(1,346,'ACTIVE'),(1,347,'ACTIVE'),(1,349,'ACTIVE'),(1,350,'ACTIVE'),(1,352,'ACTIVE'),(1,354,'ACTIVE'),(1,355,'ACTIVE'),(1,356,'ACTIVE'),(1,357,'ACTIVE'),(1,359,'ACTIVE'),(1,360,'ACTIVE'),(1,361,'ACTIVE'),(1,362,'ACTIVE'),(1,364,'ACTIVE'),(1,366,'ACTIVE'),(1,368,'ACTIVE'),(3,131,'ACTIVE'),(3,132,'ACTIVE'),(3,139,'ACTIVE'),(3,140,'ACTIVE'),(3,148,'ACTIVE'),(3,315,'ACTIVE'),(3,316,'ACTIVE'),(3,317,'ACTIVE'),(3,318,'ACTIVE'),(3,319,'ACTIVE'),(5,148,'ACTIVE'),(5,248,'ACTIVE'),(5,48,'ACTIVE'),(1,376,'ACTIVE'),(1,377,'ACTIVE'),(1,378,'ACTIVE'),(1,379,'ACTIVE'),(1,380,'ACTIVE'),(1,381,'ACTIVE'),(1,382,'ACTIVE'),(1,383,'ACTIVE'),(1,384,'ACTIVE'),(1,385,'ACTIVE'),(1,386,'ACTIVE'),(1,388,'ACTIVE'),(1,389,'ACTIVE'),(1,390,'ACTIVE'),(1,391,'ACTIVE'),(1,392,'ACTIVE'),(4,148,'ACTIVE'),(4,391,'ACTIVE'),(4,364,'ACTIVE'),(4,209,'ACTIVE'),(4,377,'ACTIVE'),(4,126,'ACTIVE'),(4,226,'ACTIVE'),(4,145,'ACTIVE'),(2,148,'ACTIVE'),(2,315,'ACTIVE'),(2,316,'ACTIVE'),(2,141,'ACTIVE'),(2,317,'ACTIVE'),(2,318,'ACTIVE'),(2,139,'ACTIVE'),(2,319,'ACTIVE'),(1,393,'ACTIVE'),(1,394,'ACTIVE');
/*!40000 ALTER TABLE `profile_process` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `provider`
--

DROP TABLE IF EXISTS `provider`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `provider` (
  `serial_prv` int(11) NOT NULL AUTO_INCREMENT,
  `name_prv` varchar(160) NOT NULL,
  `id_prv` varchar(15) NOT NULL,
  `address_prv` text NOT NULL,
  `phone1_prv` varchar(30) NOT NULL,
  `phone2_prv` varchar(30) DEFAULT NULL,
  `contact_name_prv` varchar(255) NOT NULL,
  `status_prv` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_prv`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `provider`
--

LOCK TABLES `provider` WRITE;
/*!40000 ALTER TABLE `provider` DISABLE KEYS */;
/*!40000 ALTER TABLE `provider` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `psychological_file`
--

DROP TABLE IF EXISTS `psychological_file`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `psychological_file` (
  `serial_pyf` int(11) NOT NULL AUTO_INCREMENT,
  `serial_std` int(11) DEFAULT NULL,
  `therapy_pyf` enum('PSYCHOLOGICAL','VERBAL','VISUAL','LEARNING','BEHAVIOUR','AUDITORY','FAMILY','OTHER') DEFAULT NULL,
  `discharged_pyf` enum('YES','NO') DEFAULT NULL,
  `diagnosis_pyf` text,
  `diagnosed_by_pyf` text,
  `therapy_time_pyf` text,
  `abandon_reason_pyf` text,
  `medication_pyf` text,
  `therapeutic_center_pyf` varchar(512) DEFAULT NULL,
  `registration_date_pyf` date NOT NULL,
  `status_pyf` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_pyf`),
  KEY `fk_relationship_89` (`serial_std`),
  CONSTRAINT `fk_relationship_89` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `psychological_file`
--

LOCK TABLES `psychological_file` WRITE;
/*!40000 ALTER TABLE `psychological_file` DISABLE KEYS */;
/*!40000 ALTER TABLE `psychological_file` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `qualifying_document`
--

DROP TABLE IF EXISTS `qualifying_document`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `qualifying_document` (
  `serial_qdc` int(11) NOT NULL AUTO_INCREMENT,
  `name_qdc` varchar(256) NOT NULL,
  `description_qdc` text NOT NULL,
  `status_qdc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_qdc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `qualifying_document`
--

LOCK TABLES `qualifying_document` WRITE;
/*!40000 ALTER TABLE `qualifying_document` DISABLE KEYS */;
/*!40000 ALTER TABLE `qualifying_document` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `qualitative_equivalence`
--

DROP TABLE IF EXISTS `qualitative_equivalence`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `qualitative_equivalence` (
  `serial_qeq` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `lower_percentage_qeq` decimal(5,2) NOT NULL,
  `higher_percentage_qeq` decimal(5,2) NOT NULL,
  `name_qeq` varchar(50) NOT NULL,
  `code_qeq` varchar(15) NOT NULL,
  `status_qeq` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_qeq`),
  KEY `fk_relationship_161` (`serial_scy`),
  CONSTRAINT `fk_relationship_161` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `qualitative_equivalence`
--

LOCK TABLES `qualitative_equivalence` WRITE;
/*!40000 ALTER TABLE `qualitative_equivalence` DISABLE KEYS */;
/*!40000 ALTER TABLE `qualitative_equivalence` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `recommendation`
--

DROP TABLE IF EXISTS `recommendation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `recommendation` (
  `serial_rec` int(11) NOT NULL AUTO_INCREMENT,
  `serial_att` int(11) NOT NULL,
  `serial_sbp` int(11) NOT NULL,
  `min_grade_rec` decimal(6,2) NOT NULL,
  `max_grade_rec` decimal(6,2) NOT NULL,
  `recommendation_text_rec` text NOT NULL,
  `status_rec` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_rec`),
  KEY `fk_recommendation_has_subperiod_idx` (`serial_sbp`),
  KEY `fk_recommendation_has_activity_type_idx` (`serial_att`),
  CONSTRAINT `fk_recommendation_has_activity_type` FOREIGN KEY (`serial_att`) REFERENCES `activity_type` (`serial_att`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_recommendation_has_subperiod` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `recommendation`
--

LOCK TABLES `recommendation` WRITE;
/*!40000 ALTER TABLE `recommendation` DISABLE KEYS */;
/*!40000 ALTER TABLE `recommendation` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `request_detail`
--

DROP TABLE IF EXISTS `request_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `request_detail` (
  `serial_ist` int(11) DEFAULT NULL,
  `serial_srq` int(11) DEFAULT NULL,
  `item_quantity_rdt` decimal(5,2) NOT NULL,
  `status_rdt` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_188` (`serial_ist`),
  KEY `fk_relationship_189` (`serial_srq`),
  CONSTRAINT `fk_relationship_188` FOREIGN KEY (`serial_ist`) REFERENCES `income_stock` (`serial_ist`),
  CONSTRAINT `fk_relationship_189` FOREIGN KEY (`serial_srq`) REFERENCES `stock_request` (`serial_srq`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `request_detail`
--

LOCK TABLES `request_detail` WRITE;
/*!40000 ALTER TABLE `request_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `request_detail` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `resit_change_log`
--

DROP TABLE IF EXISTS `resit_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `resit_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `remote_id_rst` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `type_rst` enum('CSB','LOP') DEFAULT 'CSB',
  `change_date_rcl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_rcl` decimal(8,5) NOT NULL,
  `comment_rcl` text,
  KEY `fk_relationship_218` (`remote_id_rst`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`,`type_rst`),
  KEY `fk_relationship_219` (`serial_usr`),
  KEY `fk_relationship_220` (`serial_chr`),
  CONSTRAINT `fk_relationship_218` FOREIGN KEY (`remote_id_rst`, `serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`, `type_rst`) REFERENCES `resit_student` (`remote_id_rst`, `serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`, `type_rst`),
  CONSTRAINT `fk_relationship_219` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_220` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `resit_change_log`
--

LOCK TABLES `resit_change_log` WRITE;
/*!40000 ALTER TABLE `resit_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `resit_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `resit_student`
--

DROP TABLE IF EXISTS `resit_student`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `resit_student` (
  `serial_emp` int(11) NOT NULL,
  `remote_id_rst` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `required_grade_rst` decimal(8,5) NOT NULL,
  `grade_rst` decimal(8,5) DEFAULT NULL,
  `type_rst` enum('CSB','LOP') NOT NULL DEFAULT 'CSB',
  `status_rst` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`remote_id_rst`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`,`type_rst`),
  KEY `fk_relationship_209` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_211` (`serial_emp`),
  CONSTRAINT `fk_relationship_209` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_211` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `resit_student`
--

LOCK TABLES `resit_student` WRITE;
/*!40000 ALTER TABLE `resit_student` DISABLE KEYS */;
/*!40000 ALTER TABLE `resit_student` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `route`
--

DROP TABLE IF EXISTS `route`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `route` (
  `serial_rot` int(11) NOT NULL AUTO_INCREMENT,
  `code_rot` varchar(35) NOT NULL,
  `description_rot` text NOT NULL,
  `status_rot` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_rot`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `route`
--

LOCK TABLES `route` WRITE;
/*!40000 ALTER TABLE `route` DISABLE KEYS */;
/*!40000 ALTER TABLE `route` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `schedule`
--

DROP TABLE IF EXISTS `schedule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schedule` (
  `serial_scd` int(11) NOT NULL AUTO_INCREMENT,
  `serial_lop` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_sps` int(11) DEFAULT NULL,
  `serial_clr` int(11) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  `serial_emp` int(11) DEFAULT NULL,
  `serial_cdt` int(11) DEFAULT NULL,
  `day_scd` enum('MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY','SUNDAY') NOT NULL,
  `status_scd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_scd`),
  KEY `fk_relationship_283` (`serial_cdt`),
  KEY `fk_relationship_284` (`serial_sbc`),
  KEY `fk_relationship_285` (`serial_crs`),
  KEY `fk_relationship_286` (`serial_lop`),
  KEY `fk_relationship_287` (`serial_emp`),
  KEY `fk_relationship_288` (`serial_clr`),
  CONSTRAINT `fk_relationship_283` FOREIGN KEY (`serial_cdt`) REFERENCES `credits_detail` (`serial_cdt`),
  CONSTRAINT `fk_relationship_284` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_285` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`),
  CONSTRAINT `fk_relationship_286` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`),
  CONSTRAINT `fk_relationship_287` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`),
  CONSTRAINT `fk_relationship_288` FOREIGN KEY (`serial_clr`) REFERENCES `classroom` (`serial_clr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `schedule`
--

LOCK TABLES `schedule` WRITE;
/*!40000 ALTER TABLE `schedule` DISABLE KEYS */;
/*!40000 ALTER TABLE `schedule` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `school`
--

DROP TABLE IF EXISTS `school`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `school` (
  `serial_sch` int(11) NOT NULL AUTO_INCREMENT,
  `name_sch` varchar(400) DEFAULT NULL,
  PRIMARY KEY (`serial_sch`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `school`
--

LOCK TABLES `school` WRITE;
/*!40000 ALTER TABLE `school` DISABLE KEYS */;
/*!40000 ALTER TABLE `school` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `school_setup`
--

DROP TABLE IF EXISTS `school_setup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `school_setup` (
  `serial_ste` int(11) DEFAULT NULL,
  `serial_crr` int(11) DEFAULT NULL,
  `name_sst` varchar(1024) NOT NULL,
  `city_sst` varchar(100) NOT NULL,
  `address_sst` text NOT NULL,
  `phone1_sst` varchar(30) NOT NULL,
  `phone2_sst` varchar(30) DEFAULT NULL,
  `phone3_sst` varchar(30) DEFAULT NULL,
  `contact_name_sst` varchar(250) NOT NULL,
  `contact_phone_sst` varchar(20) NOT NULL,
  `logo_sst` varchar(100) NOT NULL,
  `slogan_sst` varchar(300) DEFAULT NULL,
  `main_color_sst` varchar(7) NOT NULL,
  `serial_sst` int(11) DEFAULT NULL,
  `secondary_color_sst` varchar(7) NOT NULL,
  `authentication_ldap_sst` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `use_subperiods_adjustments_sst` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `send_low_grades_alert_sst` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `send_attendance_alert_sst` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `low_grade_alert_reciever_sst` set('PARENTS','COURSE_DIRECTOR','SECTION_DIRECTORS') DEFAULT NULL,
  `attendance_alert_reciever_day_sst` set('PARENTS','COURSE_DIRECTOR','SECTION_DIRECTORS') DEFAULT NULL,
  `attendance_alert_reciever_class_sst` set('PARENTS','COURSE_DIRECTOR','SECTION_DIRECTORS') DEFAULT NULL,
  `document_root_logic_sst` varchar(100) DEFAULT NULL,
  `document_root_sst` varchar(100) DEFAULT NULL,
  `name_mail_sst` varchar(100) DEFAULT NULL,
  `host_mail_sst` varchar(50) DEFAULT NULL,
  `from_mail_sst` varchar(50) DEFAULT NULL,
  `user_mail_sst` varchar(50) DEFAULT NULL,
  `pswd_mail_sst` varchar(20) DEFAULT NULL,
  `port_mail_sst` int(4) DEFAULT NULL,
  `ssl_mail_sst` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `support_mail_sst` varchar(50) DEFAULT NULL,
  `support2_mail_sst` varchar(50) DEFAULT NULL,
  `support3_mail_sst` varchar(50) DEFAULT NULL,
  KEY `fk_currency_for_school` (`serial_crr`),
  KEY `fk_school_state` (`serial_ste`),
  CONSTRAINT `fk_currency_for_school` FOREIGN KEY (`serial_crr`) REFERENCES `currency` (`serial_crr`),
  CONSTRAINT `fk_school_state` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `school_setup`
--

LOCK TABLES `school_setup` WRITE;
/*!40000 ALTER TABLE `school_setup` DISABLE KEYS */;
INSERT INTO `school_setup` VALUES (19,47,'COLEGIO NOMBRE','QUITO','Dirección','3319027',NULL,NULL,'Gladys Ronquillo','3319027','default',NULL,'5779ab',NULL,'163961','NO','YES','NO','NO','COURSE_DIRECTOR,SECTION_DIRECTORS','PARENTS,SECTION_DIRECTORS','COURSE_DIRECTOR','RUTADEMIC/DEV/','C:/xampp/htdocs/','sistema Gestión Escolar','mail.rutatec.com','prueba@rutatec.com','prueba@rutatec.com','pru3b4',25,'NO','gmronquillo@rutatec.com','gmronquillo@rutatec.com','gmronquillo@rutatec.com');
/*!40000 ALTER TABLE `school_setup` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `school_year`
--

DROP TABLE IF EXISTS `school_year`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `school_year` (
  `serial_scy` int(11) NOT NULL AUTO_INCREMENT,
  `start_date_scy` date NOT NULL,
  `end_date_scy` date NOT NULL,
  `status_scy` set('ACTIVE','CURRENT','ENDED','NEW','INACTIVE') NOT NULL DEFAULT 'NEW',
  `name_scy` varchar(150) NOT NULL,
  `grade_precision_scy` int(11) NOT NULL,
  `invoice_due_max_day_scy` int(11) DEFAULT NULL,
  `ministry_max_grade_scy` decimal(6,2) NOT NULL,
  `school_max_grade_scy` decimal(6,2) NOT NULL,
  `matricule_process_scy` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'INACTIVE',
  `invoice_start_date_scy` date NOT NULL,
  `invoice_number_scy` int(11) NOT NULL,
  `lunch_availability_scy` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'INACTIVE',
  `lower_limit_resit` decimal(5,2) DEFAULT NULL,
  `higher_limit_resit` decimal(5,2) DEFAULT NULL,
  `use_new_activities_calculus_scy` enum('YES','NO') NOT NULL DEFAULT 'NO',
  PRIMARY KEY (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `school_year`
--

LOCK TABLES `school_year` WRITE;
/*!40000 ALTER TABLE `school_year` DISABLE KEYS */;
/*!40000 ALTER TABLE `school_year` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `section`
--

DROP TABLE IF EXISTS `section`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `section` (
  `serial_set` int(11) NOT NULL AUTO_INCREMENT,
  `name_set` varchar(150) NOT NULL,
  `description_set` text,
  `status_set` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `type_set` enum('DAY','EVENING','NIGHT') NOT NULL DEFAULT 'DAY',
  PRIMARY KEY (`serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `section`
--

LOCK TABLES `section` WRITE;
/*!40000 ALTER TABLE `section` DISABLE KEYS */;
/*!40000 ALTER TABLE `section` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `section_by_year`
--

DROP TABLE IF EXISTS `section_by_year`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `section_by_year` (
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `serial_emp` int(11) DEFAULT NULL,
  `status_sby` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_scy`,`serial_set`),
  KEY `fk_section_in_year` (`serial_set`),
  KEY `fk_section_director` (`serial_emp`),
  CONSTRAINT `fk_section_director` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`),
  CONSTRAINT `fk_section_in_year` FOREIGN KEY (`serial_set`) REFERENCES `section` (`serial_set`),
  CONSTRAINT `fk_year_sections` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `section_by_year`
--

LOCK TABLES `section_by_year` WRITE;
/*!40000 ALTER TABLE `section_by_year` DISABLE KEYS */;
/*!40000 ALTER TABLE `section_by_year` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `seccion_year_trg` BEFORE UPDATE ON `section_by_year` FOR EACH ROW BEGIN

	

	IF NEW.status_sby = 'INACTIVE' THEN

	UPDATE level_section_year lsy

	SET lsy.status_lsy = 'INACTIVE'

	WHERE lsy.serial_scy = OLD.serial_scy

	AND	lsy.serial_set = OLD.serial_set;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `shift`
--

DROP TABLE IF EXISTS `shift`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shift` (
  `serial_sft` int(11) NOT NULL AUTO_INCREMENT,
  `name_sft` varchar(120) NOT NULL,
  `description_sft` text NOT NULL,
  `status_sft` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_sft`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `shift`
--

LOCK TABLES `shift` WRITE;
/*!40000 ALTER TABLE `shift` DISABLE KEYS */;
/*!40000 ALTER TABLE `shift` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `skills`
--

DROP TABLE IF EXISTS `skills`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `skills` (
  `serial_skl` int(11) NOT NULL AUTO_INCREMENT,
  `description_skl` text NOT NULL,
  `status_skl` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_skl`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `skills`
--

LOCK TABLES `skills` WRITE;
/*!40000 ALTER TABLE `skills` DISABLE KEYS */;
/*!40000 ALTER TABLE `skills` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `special_grade_change_log`
--

DROP TABLE IF EXISTS `special_grade_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `special_grade_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_ysg` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `change_date_sgl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_sgl` decimal(8,5) NOT NULL,
  `comment_sgl` text,
  KEY `fk_relationship_221` (`serial_ysg`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_222` (`serial_chr`),
  KEY `fk_relationship_223` (`serial_usr`),
  CONSTRAINT `fk_relationship_221` FOREIGN KEY (`serial_ysg`, `serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year_special_grade` (`serial_ysg`, `serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_222` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`),
  CONSTRAINT `fk_relationship_223` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `special_grade_change_log`
--

LOCK TABLES `special_grade_change_log` WRITE;
/*!40000 ALTER TABLE `special_grade_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `special_grade_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `special_subject_course`
--

DROP TABLE IF EXISTS `special_subject_course`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `special_subject_course` (
  `serial_sps` int(11) NOT NULL AUTO_INCREMENT,
  `serial_emp` int(11) DEFAULT NULL,
  `serial_csb` int(11) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  `nomenclature_sps` text,
  `credits_sps` int(11) NOT NULL,
  PRIMARY KEY (`serial_sps`),
  KEY `fk_relationship_357` (`serial_csb`),
  KEY `fk_relationship_358` (`serial_crs`),
  KEY `fk_relationship_359` (`serial_emp`),
  CONSTRAINT `fk_relationship_357` FOREIGN KEY (`serial_csb`) REFERENCES `cat_subject` (`serial_csb`),
  CONSTRAINT `fk_relationship_358` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`),
  CONSTRAINT `fk_relationship_359` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `special_subject_course`
--

LOCK TABLES `special_subject_course` WRITE;
/*!40000 ALTER TABLE `special_subject_course` DISABLE KEYS */;
/*!40000 ALTER TABLE `special_subject_course` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `special_subject_discipline_grade`
--

DROP TABLE IF EXISTS `special_subject_discipline_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `special_subject_discipline_grade` (
  `serial_sps` int(11) DEFAULT NULL,
  `serial_sbp` int(11) DEFAULT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `discipline_spg` text,
  `serial_std` int(11) DEFAULT NULL,
  KEY `fk_relationship_370` (`serial_sps`),
  KEY `fk_relationship_371` (`serial_std`),
  KEY `fk_relationship_372` (`serial_prd`),
  KEY `fk_relationship_373` (`serial_sbp`),
  CONSTRAINT `fk_relationship_370` FOREIGN KEY (`serial_sps`) REFERENCES `special_subject_course` (`serial_sps`),
  CONSTRAINT `fk_relationship_371` FOREIGN KEY (`serial_std`) REFERENCES `student_by_course` (`serial_std`),
  CONSTRAINT `fk_relationship_372` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  CONSTRAINT `fk_relationship_373` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `special_subject_discipline_grade`
--

LOCK TABLES `special_subject_discipline_grade` WRITE;
/*!40000 ALTER TABLE `special_subject_discipline_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `special_subject_discipline_grade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `special_subject_grade`
--

DROP TABLE IF EXISTS `special_subject_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `special_subject_grade` (
  `serial_sbp` int(11) DEFAULT NULL,
  `serial_sps` int(11) DEFAULT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `grade_spg` text,
  `serial_std` int(11) DEFAULT NULL,
  `date_spg` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  KEY `fk_relationship_360` (`serial_sps`),
  KEY `fk_relationship_361` (`serial_std`),
  KEY `fk_relationship_362` (`serial_prd`),
  KEY `fk_relationship_363` (`serial_sbp`),
  CONSTRAINT `fk_relationship_360` FOREIGN KEY (`serial_sps`) REFERENCES `special_subject_course` (`serial_sps`),
  CONSTRAINT `fk_relationship_361` FOREIGN KEY (`serial_std`) REFERENCES `student_by_course` (`serial_std`),
  CONSTRAINT `fk_relationship_362` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  CONSTRAINT `fk_relationship_363` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `special_subject_grade`
--

LOCK TABLES `special_subject_grade` WRITE;
/*!40000 ALTER TABLE `special_subject_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `special_subject_grade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `specialty`
--

DROP TABLE IF EXISTS `specialty`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `specialty` (
  `serial_spt` int(11) NOT NULL AUTO_INCREMENT,
  `name_spt` varchar(150) NOT NULL,
  `description_spt` text,
  `status_spt` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_spt`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `specialty`
--

LOCK TABLES `specialty` WRITE;
/*!40000 ALTER TABLE `specialty` DISABLE KEYS */;
INSERT INTO `specialty` VALUES (1,'* Ninguna','Ninguna','ACTIVE');
/*!40000 ALTER TABLE `specialty` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `state`
--

DROP TABLE IF EXISTS `state`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `state` (
  `serial_ste` int(11) NOT NULL AUTO_INCREMENT,
  `serial_cou` int(11) DEFAULT NULL,
  `name_ste` varchar(100) NOT NULL,
  `status_ste` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ste`),
  KEY `fk_country_state` (`serial_cou`),
  CONSTRAINT `fk_country_state` FOREIGN KEY (`serial_cou`) REFERENCES `country` (`serial_cou`)
) ENGINE=InnoDB AUTO_INCREMENT=339 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `state`
--

LOCK TABLES `state` WRITE;
/*!40000 ALTER TABLE `state` DISABLE KEYS */;
INSERT INTO `state` VALUES (1,61,'Azuay','ACTIVE'),(2,61,'Bolívar','ACTIVE'),(3,61,'Cañar','ACTIVE'),(4,61,'Carchi','ACTIVE'),(5,61,'Chimborazo','ACTIVE'),(6,61,'Cotopaxi','ACTIVE'),(7,61,'El Oro','ACTIVE'),(8,61,'Esmeraldas','ACTIVE'),(9,61,'Galápagos','ACTIVE'),(10,61,'Guayas','ACTIVE'),(11,61,'Imbabura','ACTIVE'),(12,61,'Loja','ACTIVE'),(13,61,'Los Ríos','ACTIVE'),(14,61,'Manab','ACTIVE'),(15,61,'Morona Santiago','ACTIVE'),(16,61,'Napo','ACTIVE'),(17,61,'Orellana','ACTIVE'),(18,61,'Pastaza','ACTIVE'),(19,61,'Pichincha','ACTIVE'),(20,61,'Santa Elena','ACTIVE'),(21,61,'Sto.Domingo de los Tsáchilas','ACTIVE'),(22,61,'Sucumbíos','ACTIVE'),(23,61,'Tungurahua','ACTIVE'),(24,61,'Zamora Chinchipe','ACTIVE'),(25,217,'Alabama','ACTIVE'),(26,217,'Alaska','ACTIVE'),(27,217,'Arizona','ACTIVE'),(28,217,'Arkansas','ACTIVE'),(29,217,'California','ACTIVE'),(30,217,'Colorado','ACTIVE'),(31,217,'Connecticut','ACTIVE'),(32,217,'Delaware','ACTIVE'),(33,217,'Dist. of Columbia','ACTIVE'),(34,217,'Florida','ACTIVE'),(35,217,'Georgia','ACTIVE'),(36,217,'Guam','ACTIVE'),(37,217,'Hawaii','ACTIVE'),(38,217,'Idaho','ACTIVE'),(39,217,'Illinois','ACTIVE'),(40,217,'Indiana','ACTIVE'),(41,217,'Iowa','ACTIVE'),(42,217,'Kansas','ACTIVE'),(43,217,'Kentucky','ACTIVE'),(44,217,'Louisiana','ACTIVE'),(45,217,'Maine','ACTIVE'),(46,217,'Maryland','ACTIVE'),(47,217,'Massachusetts','ACTIVE'),(48,217,'Michigan','ACTIVE'),(49,217,'Minnesota','ACTIVE'),(50,217,'Mississippi','ACTIVE'),(51,217,'Missouri','ACTIVE'),(52,217,'Montana','ACTIVE'),(53,217,'Nebraska','ACTIVE'),(54,217,'Nevada','ACTIVE'),(55,217,'New Hampshire','ACTIVE'),(56,217,'New Jersey','ACTIVE'),(57,217,'New Mexico','ACTIVE'),(58,217,'New York','ACTIVE'),(59,217,'North Carolina','ACTIVE'),(60,217,'North Dakota','ACTIVE'),(61,217,'Ohio','ACTIVE'),(62,217,'Oklahoma','ACTIVE'),(63,217,'Oregon','ACTIVE'),(64,217,'Pennsylvania','ACTIVE'),(65,217,'Puerto Rico','ACTIVE'),(66,217,'Rhode Island','ACTIVE'),(67,217,'South Carolina','ACTIVE'),(68,217,'South Dakota','ACTIVE'),(69,217,'Tennessee','ACTIVE'),(70,217,'Texas','ACTIVE'),(71,217,'Utah','ACTIVE'),(72,217,'Vermont','ACTIVE'),(73,217,'Virginia','ACTIVE'),(74,217,'Virgin Islands','ACTIVE'),(75,217,'Washington','ACTIVE'),(76,217,'West Virginia','ACTIVE'),(77,217,'Wisconsin','ACTIVE'),(78,217,'Wyoming','ACTIVE'),(79,50,'Pinar del R','ACTIVE'),(80,50,'Artemisa','ACTIVE'),(81,50,'La Habana','ACTIVE'),(82,50,'Mayabeque','ACTIVE'),(83,50,'Matanzas','ACTIVE'),(84,50,'Cienfuegos','ACTIVE'),(85,50,'Villa Clara','ACTIVE'),(86,50,'Sancti Spíritus','ACTIVE'),(87,50,'Ciego de Ávila','ACTIVE'),(88,50,'Camagüey','ACTIVE'),(89,50,'Las Tunas','ACTIVE'),(90,50,'Granma','ACTIVE'),(91,50,'Holgu','ACTIVE'),(92,50,'Santiago de Cuba','ACTIVE'),(93,50,'Guantánamo','ACTIVE'),(94,50,'Isla de la Juventud','ACTIVE'),(95,55,'Baden-Wurttemberg','ACTIVE'),(96,55,'Bavaria','ACTIVE'),(97,55,'Berlin','ACTIVE'),(98,55,'Brandenburg','ACTIVE'),(99,55,'Bremen','ACTIVE'),(100,55,'Hamburg','ACTIVE'),(101,55,'Hesse','ACTIVE'),(102,55,'Lower Saxony','ACTIVE'),(103,55,'Mecklenburg-West Pomerania','ACTIVE'),(104,55,'North Rhine-Westphalia','ACTIVE'),(105,55,'Rhineland-Palatinate','ACTIVE'),(106,55,'Saarland','ACTIVE'),(107,55,'Saxony','ACTIVE'),(108,55,'Saxony-Anhalt','ACTIVE'),(109,55,'Schleswig-Holstein','ACTIVE'),(110,55,'Thuringia','ACTIVE'),(111,1,'Otra','ACTIVE'),(112,2,'Otra','ACTIVE'),(113,3,'Otra','ACTIVE'),(114,4,'Otra','ACTIVE'),(115,5,'Otra','ACTIVE'),(116,6,'Otra','ACTIVE'),(117,7,'Otra','ACTIVE'),(118,8,'Otra','ACTIVE'),(119,9,'Otra','ACTIVE'),(120,10,'Otra','ACTIVE'),(121,11,'Otra','ACTIVE'),(122,12,'Otra','ACTIVE'),(123,13,'Otra','ACTIVE'),(124,14,'Otra','ACTIVE'),(125,15,'Otra','ACTIVE'),(126,16,'Otra','ACTIVE'),(127,17,'Otra','ACTIVE'),(128,18,'Otra','ACTIVE'),(129,19,'Otra','ACTIVE'),(130,20,'Otra','ACTIVE'),(131,21,'Otra','ACTIVE'),(132,22,'Otra','ACTIVE'),(133,23,'Otra','ACTIVE'),(134,24,'Otra','ACTIVE'),(135,25,'Otra','ACTIVE'),(136,26,'Otra','ACTIVE'),(137,27,'Otra','ACTIVE'),(138,28,'Otra','ACTIVE'),(139,29,'Otra','ACTIVE'),(140,30,'Otra','ACTIVE'),(141,31,'Otra','ACTIVE'),(142,32,'Otra','ACTIVE'),(143,33,'Otra','ACTIVE'),(144,34,'Otra','ACTIVE'),(145,35,'Otra','ACTIVE'),(146,36,'Otra','ACTIVE'),(147,37,'Otra','ACTIVE'),(148,38,'Otra','ACTIVE'),(149,39,'Otra','ACTIVE'),(150,40,'Otra','ACTIVE'),(151,41,'Otra','ACTIVE'),(152,42,'Otra','ACTIVE'),(153,43,'Otra','ACTIVE'),(154,44,'Otra','ACTIVE'),(155,45,'Otra','ACTIVE'),(156,46,'Otra','ACTIVE'),(157,47,'Otra','ACTIVE'),(158,48,'Otra','ACTIVE'),(159,49,'Otra','ACTIVE'),(160,51,'Otra','ACTIVE'),(161,52,'Otra','ACTIVE'),(162,53,'Otra','ACTIVE'),(163,54,'Otra','ACTIVE'),(164,56,'Otra','ACTIVE'),(165,57,'Otra','ACTIVE'),(166,58,'Otra','ACTIVE'),(167,59,'Otra','ACTIVE'),(168,60,'Otra','ACTIVE'),(169,62,'Otra','ACTIVE'),(170,63,'Otra','ACTIVE'),(171,64,'Otra','ACTIVE'),(172,65,'Otra','ACTIVE'),(173,66,'Otra','ACTIVE'),(174,67,'Otra','ACTIVE'),(175,68,'Otra','ACTIVE'),(176,69,'Otra','ACTIVE'),(177,70,'Otra','ACTIVE'),(178,71,'Otra','ACTIVE'),(179,72,'Otra','ACTIVE'),(180,73,'Otra','ACTIVE'),(181,74,'Otra','ACTIVE'),(182,75,'Otra','ACTIVE'),(183,76,'Otra','ACTIVE'),(184,77,'Otra','ACTIVE'),(185,78,'Otra','ACTIVE'),(186,79,'Otra','ACTIVE'),(187,80,'Otra','ACTIVE'),(188,81,'Otra','ACTIVE'),(189,82,'Otra','ACTIVE'),(190,83,'Otra','ACTIVE'),(191,84,'Otra','ACTIVE'),(192,85,'Otra','ACTIVE'),(193,86,'Otra','ACTIVE'),(194,87,'Otra','ACTIVE'),(195,88,'Otra','ACTIVE'),(196,89,'Otra','ACTIVE'),(197,90,'Otra','ACTIVE'),(198,91,'Otra','ACTIVE'),(199,92,'Otra','ACTIVE'),(200,93,'Otra','ACTIVE'),(201,94,'Otra','ACTIVE'),(202,95,'Otra','ACTIVE'),(203,96,'Otra','ACTIVE'),(204,97,'Otra','ACTIVE'),(205,98,'Otra','ACTIVE'),(206,99,'Otra','ACTIVE'),(207,100,'Otra','ACTIVE'),(208,101,'Otra','ACTIVE'),(209,102,'Otra','ACTIVE'),(210,103,'Otra','ACTIVE'),(211,104,'Otra','ACTIVE'),(212,105,'Otra','ACTIVE'),(213,106,'Otra','ACTIVE'),(214,107,'Otra','ACTIVE'),(215,108,'Otra','ACTIVE'),(216,109,'Otra','ACTIVE'),(217,110,'Otra','ACTIVE'),(218,111,'Otra','ACTIVE'),(219,112,'Otra','ACTIVE'),(220,113,'Otra','ACTIVE'),(221,114,'Otra','ACTIVE'),(222,115,'Otra','ACTIVE'),(223,116,'Otra','ACTIVE'),(224,117,'Otra','ACTIVE'),(225,118,'Otra','ACTIVE'),(226,119,'Otra','ACTIVE'),(227,120,'Otra','ACTIVE'),(228,121,'Otra','ACTIVE'),(229,122,'Otra','ACTIVE'),(230,123,'Otra','ACTIVE'),(231,124,'Otra','ACTIVE'),(232,125,'Otra','ACTIVE'),(233,126,'Otra','ACTIVE'),(234,127,'Otra','ACTIVE'),(235,128,'Otra','ACTIVE'),(236,129,'Otra','ACTIVE'),(237,130,'Otra','ACTIVE'),(238,131,'Otra','ACTIVE'),(239,132,'Otra','ACTIVE'),(240,133,'Otra','ACTIVE'),(241,134,'Otra','ACTIVE'),(242,135,'Otra','ACTIVE'),(243,136,'Otra','ACTIVE'),(244,137,'Otra','ACTIVE'),(245,138,'Otra','ACTIVE'),(246,139,'Otra','ACTIVE'),(247,140,'Otra','ACTIVE'),(248,141,'Otra','ACTIVE'),(249,142,'Otra','ACTIVE'),(250,143,'Otra','ACTIVE'),(251,144,'Otra','ACTIVE'),(252,145,'Otra','ACTIVE'),(253,146,'Otra','ACTIVE'),(254,147,'Otra','ACTIVE'),(255,148,'Otra','ACTIVE'),(256,149,'Otra','ACTIVE'),(257,150,'Otra','ACTIVE'),(258,151,'Otra','ACTIVE'),(259,152,'Otra','ACTIVE'),(260,153,'Otra','ACTIVE'),(261,154,'Otra','ACTIVE'),(262,155,'Otra','ACTIVE'),(263,156,'Otra','ACTIVE'),(264,157,'Otra','ACTIVE'),(265,158,'Otra','ACTIVE'),(266,159,'Otra','ACTIVE'),(267,160,'Otra','ACTIVE'),(268,161,'Otra','ACTIVE'),(269,162,'Otra','ACTIVE'),(270,163,'Otra','ACTIVE'),(271,164,'Otra','ACTIVE'),(272,165,'Otra','ACTIVE'),(273,166,'Otra','ACTIVE'),(274,167,'Otra','ACTIVE'),(275,168,'Otra','ACTIVE'),(276,169,'Otra','ACTIVE'),(277,170,'Otra','ACTIVE'),(278,171,'Otra','ACTIVE'),(279,172,'Otra','ACTIVE'),(280,173,'Otra','ACTIVE'),(281,174,'Otra','ACTIVE'),(282,175,'Otra','ACTIVE'),(283,176,'Otra','ACTIVE'),(284,177,'Otra','ACTIVE'),(285,178,'Otra','ACTIVE'),(286,179,'Otra','ACTIVE'),(287,180,'Otra','ACTIVE'),(288,181,'Otra','ACTIVE'),(289,182,'Otra','ACTIVE'),(290,183,'Otra','ACTIVE'),(291,184,'Otra','ACTIVE'),(292,185,'Otra','ACTIVE'),(293,186,'Otra','ACTIVE'),(294,187,'Otra','ACTIVE'),(295,188,'Otra','ACTIVE'),(296,189,'Otra','ACTIVE'),(297,190,'Otra','ACTIVE'),(298,191,'Otra','ACTIVE'),(299,192,'Otra','ACTIVE'),(300,193,'Otra','ACTIVE'),(301,194,'Otra','ACTIVE'),(302,195,'Otra','ACTIVE'),(303,196,'Otra','ACTIVE'),(304,197,'Otra','ACTIVE'),(305,198,'Otra','ACTIVE'),(306,199,'Otra','ACTIVE'),(307,200,'Otra','ACTIVE'),(308,201,'Otra','ACTIVE'),(309,202,'Otra','ACTIVE'),(310,203,'Otra','ACTIVE'),(311,204,'Otra','ACTIVE'),(312,205,'Otra','ACTIVE'),(313,206,'Otra','ACTIVE'),(314,207,'Otra','ACTIVE'),(315,208,'Otra','ACTIVE'),(316,209,'Otra','ACTIVE'),(317,210,'Otra','ACTIVE'),(318,211,'Otra','ACTIVE'),(319,212,'Otra','ACTIVE'),(320,213,'Otra','ACTIVE'),(321,214,'Otra','ACTIVE'),(322,215,'Otra','ACTIVE'),(323,216,'Otra','ACTIVE'),(324,218,'Otra','ACTIVE'),(325,219,'Otra','ACTIVE'),(326,220,'Otra','ACTIVE'),(327,221,'Otra','ACTIVE'),(328,222,'Otra','ACTIVE'),(329,223,'Otra','ACTIVE'),(330,224,'Otra','ACTIVE'),(331,225,'Otra','ACTIVE'),(332,226,'Otra','ACTIVE'),(333,227,'Otra','ACTIVE'),(334,228,'Otra','ACTIVE'),(335,229,'Otra','ACTIVE'),(336,230,'Otra','ACTIVE'),(337,231,'Otra','ACTIVE'),(338,232,'Otra','ACTIVE');
/*!40000 ALTER TABLE `state` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `stock_request`
--

DROP TABLE IF EXISTS `stock_request`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stock_request` (
  `serial_srq` int(11) NOT NULL AUTO_INCREMENT,
  `serial_udt` int(11) DEFAULT NULL,
  `serial_usr` int(11) DEFAULT NULL,
  `description_srq` text NOT NULL,
  `request_date_srq` date NOT NULL,
  `status_srq` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_srq`),
  KEY `fk_relationship_187` (`serial_udt`),
  KEY `fk_relationship_190` (`serial_usr`),
  CONSTRAINT `fk_relationship_187` FOREIGN KEY (`serial_udt`) REFERENCES `use_destination` (`serial_udt`),
  CONSTRAINT `fk_relationship_190` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `stock_request`
--

LOCK TABLES `stock_request` WRITE;
/*!40000 ALTER TABLE `stock_request` DISABLE KEYS */;
/*!40000 ALTER TABLE `stock_request` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student`
--

DROP TABLE IF EXISTS `student`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student` (
  `serial_std` int(11) NOT NULL AUTO_INCREMENT,
  `serial_fml` int(11) DEFAULT NULL,
  `serial_ste` int(11) DEFAULT NULL,
  `serial_usr` int(11) NOT NULL,
  `serial_nnt` int(11) DEFAULT NULL,
  `id_std` varchar(13) NOT NULL,
  `code_std` varchar(13) DEFAULT NULL,
  `first_name_std` varchar(255) NOT NULL,
  `last_name_std` varchar(255) NOT NULL,
  `birthdate_std` date NOT NULL,
  `birthcity_std` varchar(80) DEFAULT NULL,
  `gender_std` enum('MALE','FEMALE') NOT NULL,
  `marital_status_std` enum('SINGLE','MARRIED','DIVORCED','WIDOWED','UNMARRIED PARTNERS') NOT NULL DEFAULT 'SINGLE',
  `phone_std` varchar(30) DEFAULT NULL,
  `mobile_std` varchar(32) DEFAULT NULL,
  `orphan_std` enum('NONE','FATHER','MOTHER','BOTH') NOT NULL DEFAULT 'NONE',
  `type_std` enum('NEW','OLD') NOT NULL DEFAULT 'NEW',
  `email_std` varchar(256) DEFAULT NULL,
  `observation_std` text,
  `status_std` enum('ACTIVE','INACTIVE','BLOCKED') NOT NULL DEFAULT 'INACTIVE',
  `lives_with_std` enum('PARENTS','MOTHER','FATHER','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') DEFAULT NULL,
  `first_name_mother_std` varchar(128) DEFAULT NULL,
  `last_name_mother_std` varchar(128) DEFAULT NULL,
  `phone_mother_std` varchar(30) DEFAULT NULL,
  `mobile_mother_std` varchar(30) DEFAULT NULL,
  `office_phone_mother_std` varchar(30) DEFAULT NULL,
  `first_name_father_std` varchar(128) DEFAULT NULL,
  `last_name_father_std` varchar(128) DEFAULT NULL,
  `phone_father_std` varchar(30) DEFAULT NULL,
  `mobile_father_std` varchar(30) DEFAULT NULL,
  `office_phone_father_std` varchar(30) DEFAULT NULL,
  `previous_school_std` text,
  `school_entrydate_std` date DEFAULT NULL,
  `exit_type` enum('BUS','DOOR') NOT NULL,
  `left_alone` enum('YES','NO') NOT NULL,
  PRIMARY KEY (`serial_std`),
  KEY `fk_relationship_240` (`serial_ste`),
  KEY `fk_relationship_61` (`serial_nnt`),
  KEY `fk_student_user` (`serial_usr`),
  CONSTRAINT `fk_relationship_240` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`),
  CONSTRAINT `fk_relationship_61` FOREIGN KEY (`serial_nnt`) REFERENCES `nationality` (`serial_nnt`),
  CONSTRAINT `fk_student_user` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student`
--

LOCK TABLES `student` WRITE;
/*!40000 ALTER TABLE `student` DISABLE KEYS */;
/*!40000 ALTER TABLE `student` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_activity_attachment`
--

DROP TABLE IF EXISTS `student_activity_attachment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_activity_attachment` (
  `serial_saa` int(11) NOT NULL AUTO_INCREMENT,
  `name_saa` varchar(256) NOT NULL,
  `filename_saa` varchar(256) NOT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_act` int(11) DEFAULT NULL,
  `status_saa` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_saa`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_activity_attachment`
--

LOCK TABLES `student_activity_attachment` WRITE;
/*!40000 ALTER TABLE `student_activity_attachment` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_activity_attachment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_address`
--

DROP TABLE IF EXISTS `student_address`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_address` (
  `serial_sta` int(11) NOT NULL AUTO_INCREMENT COMMENT 'clave primaria de la tabla student_address, autoincremental',
  `serial_std` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla estudiante',
  `serial_ste` int(11) NOT NULL COMMENT 'clave foranea perteneciante a la tabla provincia',
  `serial_cnt` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla canton',
  `serial_par` int(11) NOT NULL COMMENT 'clave foranea perteneciente a la tabla parroquia',
  `serial_zne` int(11) DEFAULT NULL COMMENT 'clave foranea perteneciente a la tabla zona',
  `main_street_sta` varchar(64) NOT NULL,
  `number_sta` varchar(32) NOT NULL,
  `secondary_street_sta` varchar(64) DEFAULT NULL,
  `address_type_sta` enum('HOME','WORK','OTHER') NOT NULL DEFAULT 'OTHER',
  `phone1_sta` varchar(32) NOT NULL,
  `phone2_sta` varchar(32) DEFAULT NULL,
  `main_address_sta` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `status_sta` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE' COMMENT 'indica si la direccion esta en uso o esta borrada',
  PRIMARY KEY (`serial_sta`),
  KEY `FK_student_has_address` (`serial_std`),
  KEY `FK_address_has_state` (`serial_ste`),
  KEY `FK_address_has_county` (`serial_cnt`),
  KEY `FK_address_has_parish` (`serial_par`),
  KEY `FK_address_has_zone` (`serial_zne`),
  CONSTRAINT `FK_address_has_county` FOREIGN KEY (`serial_cnt`) REFERENCES `counties` (`serial_cnt`),
  CONSTRAINT `FK_address_has_parish` FOREIGN KEY (`serial_par`) REFERENCES `parish` (`serial_par`),
  CONSTRAINT `FK_address_has_state` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`),
  CONSTRAINT `FK_address_has_zone` FOREIGN KEY (`serial_zne`) REFERENCES `zone_address` (`serial_zne`),
  CONSTRAINT `FK_student_has_address` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_address`
--

LOCK TABLES `student_address` WRITE;
/*!40000 ALTER TABLE `student_address` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_address` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_by_course`
--

DROP TABLE IF EXISTS `student_by_course`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_by_course` (
  `serial_std` int(11) NOT NULL,
  `serial_crs` int(11) NOT NULL,
  `status_stc` enum('ACTIVE','INACTIVE','RETIRED') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_std`,`serial_crs`),
  KEY `fk_course_for_student` (`serial_crs`),
  CONSTRAINT `fk_course_for_student` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`),
  CONSTRAINT `fk_student_in_course` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_by_course`
--

LOCK TABLES `student_by_course` WRITE;
/*!40000 ALTER TABLE `student_by_course` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_by_course` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_criteria_grade`
--

DROP TABLE IF EXISTS `student_criteria_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_criteria_grade` (
  `serial_sbc` int(11) NOT NULL,
  `serial_att` int(11) NOT NULL,
  `serial_prd` int(11) NOT NULL,
  `serial_gct` int(11) NOT NULL,
  `serial_act` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_crs` int(11) NOT NULL,
  `grade_scg` decimal(8,5) DEFAULT NULL,
  `is_complete_scg` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `activity_grade_part_scg` decimal(10,6) DEFAULT NULL,
  `status_scg` enum('ACTIVE','INACTIVE','NOT_APPLY') NOT NULL DEFAULT 'ACTIVE',
  `date_scg` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`serial_sbc`,`serial_att`,`serial_prd`,`serial_gct`,`serial_act`,`serial_std`,`serial_crs`),
  KEY `fk_relationship_100` (`serial_std`,`serial_crs`),
  KEY `fk_relationship_99` (`serial_att`,`serial_prd`,`serial_sbc`,`serial_gct`,`serial_act`),
  CONSTRAINT `fk_relationship_100` FOREIGN KEY (`serial_std`, `serial_crs`) REFERENCES `student_by_course` (`serial_std`, `serial_crs`),
  CONSTRAINT `fk_relationship_99` FOREIGN KEY (`serial_att`, `serial_prd`, `serial_sbc`, `serial_gct`, `serial_act`) REFERENCES `activity_applied_criterias` (`serial_att`, `serial_prd`, `serial_sbc`, `serial_gct`, `serial_act`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_criteria_grade`
--

LOCK TABLES `student_criteria_grade` WRITE;
/*!40000 ALTER TABLE `student_criteria_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_criteria_grade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_guardian`
--

DROP TABLE IF EXISTS `student_guardian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_guardian` (
  `serial_std` int(11) NOT NULL,
  `serial_grd` int(11) NOT NULL,
  `relationship_stg` enum('MOTHER','FATHER','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') NOT NULL,
  `legal_guardian_stg` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `economic_guardian_stg` enum('YES','NO') NOT NULL,
  `status_stg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_std`,`serial_grd`),
  KEY `fk_is_guardian` (`serial_grd`),
  CONSTRAINT `fk_has_guardian` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`),
  CONSTRAINT `fk_is_guardian` FOREIGN KEY (`serial_grd`) REFERENCES `guardian` (`serial_grd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_guardian`
--

LOCK TABLES `student_guardian` WRITE;
/*!40000 ALTER TABLE `student_guardian` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_guardian` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_improvement_plan`
--

DROP TABLE IF EXISTS `student_improvement_plan`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_improvement_plan` (
  `serial_std` int(11) NOT NULL,
  `serial_imp` int(11) NOT NULL,
  `status_sti` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_std`,`serial_imp`),
  KEY `fk_student_has_improvement_plan_idx` (`serial_imp`),
  CONSTRAINT `fk_student_improvement_plan_has_improvement_plan` FOREIGN KEY (`serial_imp`) REFERENCES `improvement_plan` (`serial_imp`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_student_improvement_plan_has_student` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_improvement_plan`
--

LOCK TABLES `student_improvement_plan` WRITE;
/*!40000 ALTER TABLE `student_improvement_plan` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_improvement_plan` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_lunch_contract`
--

DROP TABLE IF EXISTS `student_lunch_contract`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_lunch_contract` (
  `serial_slc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_lyt` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `days_slc` set('MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY') NOT NULL,
  `start_date_slc` date NOT NULL,
  `end_date_slc` date NOT NULL,
  `lunch_quantity_slc` int(11) NOT NULL,
  `final_price_slc` decimal(10,2) NOT NULL,
  `status_slc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `serial_slc_liquidated` int(11) DEFAULT NULL,
  PRIMARY KEY (`serial_slc`),
  KEY `fk_relationship_7003` (`serial_lyt`),
  KEY `fk_relationship_7004` (`serial_std`),
  CONSTRAINT `fk_relationship_7003` FOREIGN KEY (`serial_lyt`) REFERENCES `level_section_year_lunch_type` (`serial_lyt`),
  CONSTRAINT `fk_relationship_7004` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_lunch_contract`
--

LOCK TABLES `student_lunch_contract` WRITE;
/*!40000 ALTER TABLE `student_lunch_contract` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_lunch_contract` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_lunch_contract_detail`
--

DROP TABLE IF EXISTS `student_lunch_contract_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_lunch_contract_detail` (
  `serial_sld` int(11) NOT NULL AUTO_INCREMENT,
  `serial_slc` int(11) NOT NULL,
  `week_day_sld` enum('MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY') NOT NULL,
  `date_sld` date NOT NULL,
  `status_sld` enum('ACTIVE','INACTIVE','CANCELLED') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_sld`),
  KEY `fk_relationship_7123003` (`serial_slc`),
  CONSTRAINT `fk_relationship_7123003` FOREIGN KEY (`serial_slc`) REFERENCES `student_lunch_contract` (`serial_slc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_lunch_contract_detail`
--

LOCK TABLES `student_lunch_contract_detail` WRITE;
/*!40000 ALTER TABLE `student_lunch_contract_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_lunch_contract_detail` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_optional_subject`
--

DROP TABLE IF EXISTS `student_optional_subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_optional_subject` (
  `serial_osb` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_prd` int(11) NOT NULL,
  `serial_lop` int(11) NOT NULL,
  `status_sos` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_osb`,`serial_std`,`serial_prd`,`serial_lop`),
  KEY `fk_relationship_109` (`serial_std`),
  KEY `fk_relationship_246` (`serial_prd`,`serial_lop`),
  CONSTRAINT `fk_relationship_108` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`),
  CONSTRAINT `fk_relationship_109` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`),
  CONSTRAINT `fk_relationship_246` FOREIGN KEY (`serial_prd`, `serial_lop`) REFERENCES `level_optional_group_detail` (`serial_prd`, `serial_lop`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_optional_subject`
--

LOCK TABLES `student_optional_subject` WRITE;
/*!40000 ALTER TABLE `student_optional_subject` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_optional_subject` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_period_comment`
--

DROP TABLE IF EXISTS `student_period_comment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_period_comment` (
  `serial_std` int(11) DEFAULT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `comment_spc` text NOT NULL,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  KEY `fk_relationship_315` (`serial_usr`,`serial_crs`),
  KEY `fk_relationship_316` (`serial_prd`),
  KEY `fk_relationship_318` (`serial_std`),
  CONSTRAINT `fk_relationship_315` FOREIGN KEY (`serial_usr`, `serial_crs`) REFERENCES `user_course_comment_setup` (`serial_usr`, `serial_crs`),
  CONSTRAINT `fk_relationship_316` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  CONSTRAINT `fk_relationship_318` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_period_comment`
--

LOCK TABLES `student_period_comment` WRITE;
/*!40000 ALTER TABLE `student_period_comment` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_period_comment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_period_exam`
--

DROP TABLE IF EXISTS `student_period_exam`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_period_exam` (
  `serial_spx` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `grade_stx` decimal(8,5) DEFAULT NULL,
  `status_stx` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_spx`,`serial_std`),
  KEY `fk_relationship_309` (`serial_std`),
  CONSTRAINT `fk_relationship_308` FOREIGN KEY (`serial_spx`) REFERENCES `subject_period_exam` (`serial_spx`),
  CONSTRAINT `fk_relationship_309` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_period_exam`
--

LOCK TABLES `student_period_exam` WRITE;
/*!40000 ALTER TABLE `student_period_exam` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_period_exam` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_period_subject_skill_grade`
--

DROP TABLE IF EXISTS `student_period_subject_skill_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_period_subject_skill_grade` (
  `serial_ssg` int(11) NOT NULL AUTO_INCREMENT,
  `serial_osc` int(11) DEFAULT NULL,
  `serial_yss` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_lsc` int(11) DEFAULT NULL,
  `status_ssg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ssg`),
  KEY `fk_relationship_323` (`serial_prd`),
  KEY `fk_relationship_324` (`serial_yss`),
  KEY `fk_relationship_325` (`serial_osc`),
  KEY `fk_relationship_326` (`serial_lsc`),
  KEY `fk_relationship_327` (`serial_std`),
  CONSTRAINT `fk_relationship_323` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  CONSTRAINT `fk_relationship_324` FOREIGN KEY (`serial_yss`) REFERENCES `year_subject_skills` (`serial_yss`),
  CONSTRAINT `fk_relationship_325` FOREIGN KEY (`serial_osc`) REFERENCES `level_opt_skill_criteria` (`serial_osc`),
  CONSTRAINT `fk_relationship_326` FOREIGN KEY (`serial_lsc`) REFERENCES `level_skill_grade_criteria` (`serial_lsc`),
  CONSTRAINT `fk_relationship_327` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_period_subject_skill_grade`
--

LOCK TABLES `student_period_subject_skill_grade` WRITE;
/*!40000 ALTER TABLE `student_period_subject_skill_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_period_subject_skill_grade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_profile`
--

DROP TABLE IF EXISTS `student_profile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_profile` (
  `serial_stp` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `profile_stp` varchar(100) NOT NULL,
  `month_stp` varchar(15) NOT NULL,
  `status_stp` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_stp`),
  KEY `school_year_student_profile_fk1_idx` (`serial_scy`),
  KEY `school_year_student_profile_fk2_idx` (`serial_lvl`),
  KEY `school_year_student_profile_fk3_idx` (`serial_set`),
  KEY `school_year_student_profile_fk4_idx` (`serial_spt`),
  CONSTRAINT `level_student_profile_fk` FOREIGN KEY (`serial_lvl`) REFERENCES `level` (`serial_lvl`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `school_year_student_profile_fk` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `section_student_profile_fk` FOREIGN KEY (`serial_set`) REFERENCES `section` (`serial_set`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `specialty_student_profile_fk` FOREIGN KEY (`serial_spt`) REFERENCES `specialty` (`serial_spt`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=' /* comment truncated */ /*Contains student profiles related to PEP*/';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_profile`
--

LOCK TABLES `student_profile` WRITE;
/*!40000 ALTER TABLE `student_profile` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_profile` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_refreshments_detail`
--

DROP TABLE IF EXISTS `student_refreshments_detail`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_refreshments_detail` (
  `serial_sfd` int(11) NOT NULL AUTO_INCREMENT,
  `serial_std` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `month_year_sfd` text NOT NULL,
  `start_value_sfd` decimal(10,2) NOT NULL,
  `used_value_sfd` decimal(10,2) NOT NULL,
  `type_sfd` enum('PREPAID','REFRESHMENT') NOT NULL,
  `status_sfd` enum('ACTIVE','INACTIVE','CANCELLED') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_sfd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_refreshments_detail`
--

LOCK TABLES `student_refreshments_detail` WRITE;
/*!40000 ALTER TABLE `student_refreshments_detail` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_refreshments_detail` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_subject_period_average`
--

DROP TABLE IF EXISTS `student_subject_period_average`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_subject_period_average` (
  `serial_ssa` int(11) NOT NULL AUTO_INCREMENT,
  `stu_serial_ssa` int(11) DEFAULT NULL,
  `serial_lop` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `average_ssa` decimal(8,5) DEFAULT NULL,
  `compensation_point_ssa` decimal(8,5) DEFAULT NULL,
  `final_average_ssa` decimal(8,5) DEFAULT NULL,
  PRIMARY KEY (`serial_ssa`),
  KEY `fk_relationship_248` (`stu_serial_ssa`),
  KEY `fk_relationship_250` (`serial_sbc`),
  KEY `fk_relationship_251` (`serial_lop`),
  KEY `fk_relationship_252` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_253` (`serial_prd`),
  CONSTRAINT `fk_relationship_248` FOREIGN KEY (`stu_serial_ssa`) REFERENCES `student_subject_period_average` (`serial_ssa`),
  CONSTRAINT `fk_relationship_250` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_251` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`),
  CONSTRAINT `fk_relationship_252` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_253` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_subject_period_average`
--

LOCK TABLES `student_subject_period_average` WRITE;
/*!40000 ALTER TABLE `student_subject_period_average` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_subject_period_average` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_subject_subperiod_average`
--

DROP TABLE IF EXISTS `student_subject_subperiod_average`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_subject_subperiod_average` (
  `serial_sss` int(11) NOT NULL AUTO_INCREMENT,
  `serial_lop` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_sbp` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `average_sss` decimal(8,5) DEFAULT NULL,
  `recommendation_sss` text,
  `recovery_plan_sss` text,
  PRIMARY KEY (`serial_sss`),
  KEY `fk_relationship_346` (`serial_sbp`),
  KEY `fk_relationship_347` (`serial_sbc`),
  KEY `fk_relationship_348` (`serial_lop`),
  KEY `fk_relationship_349` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_346` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`),
  CONSTRAINT `fk_relationship_347` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_348` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`),
  CONSTRAINT `fk_relationship_349` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_subject_subperiod_average`
--

LOCK TABLES `student_subject_subperiod_average` WRITE;
/*!40000 ALTER TABLE `student_subject_subperiod_average` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_subject_subperiod_average` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_subject_year_average`
--

DROP TABLE IF EXISTS `student_subject_year_average`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_subject_year_average` (
  `serial_sya` int(11) NOT NULL AUTO_INCREMENT,
  `serial_lop` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_csb` int(11) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `average_sya` decimal(8,5) DEFAULT NULL,
  `recovery_exam_grade_sya` decimal(8,5) DEFAULT NULL,
  `recovery_replace_serial_prd` int(11) DEFAULT NULL,
  `resit_exam_grade_sya` decimal(8,5) DEFAULT NULL,
  `remedy_exam_grade_sya` decimal(8,5) DEFAULT NULL,
  `grace_exam_grade_sya` decimal(8,5) DEFAULT NULL,
  `final_grade_sya` decimal(8,5) DEFAULT NULL,
  `validation_parameter_sya` enum('NONE','RECOVERY','RESIT','REMEDY','GRACE') NOT NULL DEFAULT 'NONE',
  `subject_type_sya` enum('SIMPLE','PARENT') NOT NULL DEFAULT 'SIMPLE',
  PRIMARY KEY (`serial_sya`),
  KEY `fk_relationship_8747` (`serial_sbc`),
  KEY `fk_relationship_8748` (`serial_lop`),
  KEY `fk_relationship_8749` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_8747` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_8748` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`),
  CONSTRAINT `fk_relationship_8749` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_subject_year_average`
--

LOCK TABLES `student_subject_year_average` WRITE;
/*!40000 ALTER TABLE `student_subject_year_average` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_subject_year_average` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_subperiod_comment`
--

DROP TABLE IF EXISTS `student_subperiod_comment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_subperiod_comment` (
  `serial_std` int(11) DEFAULT NULL,
  `serial_sbp` int(11) DEFAULT NULL,
  `comment_ssc` text NOT NULL,
  `serial_usr` int(11) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  KEY `fk_relationship_44315` (`serial_usr`,`serial_crs`),
  KEY `fk_relationship_44316` (`serial_sbp`),
  KEY `fk_relationship_44318` (`serial_std`),
  CONSTRAINT `fk_relationship_44315` FOREIGN KEY (`serial_usr`, `serial_crs`) REFERENCES `user_course_comment_setup` (`serial_usr`, `serial_crs`),
  CONSTRAINT `fk_relationship_44316` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`),
  CONSTRAINT `fk_relationship_44318` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_subperiod_comment`
--

LOCK TABLES `student_subperiod_comment` WRITE;
/*!40000 ALTER TABLE `student_subperiod_comment` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_subperiod_comment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_subperiod_discipline_course_director`
--

DROP TABLE IF EXISTS `student_subperiod_discipline_course_director`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_subperiod_discipline_course_director` (
  `serial_cdd` int(11) NOT NULL AUTO_INCREMENT,
  `serial_sbp` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `grade_cdd` decimal(8,5) DEFAULT NULL,
  PRIMARY KEY (`serial_cdd`),
  KEY `fk_relationship_7454` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_7456` (`serial_sbp`),
  CONSTRAINT `fk_relationship_7454` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_7456` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_subperiod_discipline_course_director`
--

LOCK TABLES `student_subperiod_discipline_course_director` WRITE;
/*!40000 ALTER TABLE `student_subperiod_discipline_course_director` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_subperiod_discipline_course_director` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_subperiod_discipline_subject`
--

DROP TABLE IF EXISTS `student_subperiod_discipline_subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_subperiod_discipline_subject` (
  `serial_sdg` int(11) NOT NULL AUTO_INCREMENT,
  `serial_sbp` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_lop` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `grade_sdg` decimal(8,5) DEFAULT NULL,
  PRIMARY KEY (`serial_sdg`),
  KEY `fk_relationship_353` (`serial_lop`),
  KEY `fk_relationship_354` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_355` (`serial_sbc`),
  KEY `fk_relationship_356` (`serial_sbp`),
  CONSTRAINT `fk_relationship_353` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`),
  CONSTRAINT `fk_relationship_354` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_355` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_356` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_subperiod_discipline_subject`
--

LOCK TABLES `student_subperiod_discipline_subject` WRITE;
/*!40000 ALTER TABLE `student_subperiod_discipline_subject` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_subperiod_discipline_subject` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_subperiod_discipline_supervisor`
--

DROP TABLE IF EXISTS `student_subperiod_discipline_supervisor`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_subperiod_discipline_supervisor` (
  `serial_sds` int(11) NOT NULL AUTO_INCREMENT,
  `serial_sbp` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `grade_sds` decimal(8,5) DEFAULT NULL,
  PRIMARY KEY (`serial_sds`),
  KEY `fk_relationship_454` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_456` (`serial_sbp`),
  CONSTRAINT `fk_relationship_454` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_456` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_subperiod_discipline_supervisor`
--

LOCK TABLES `student_subperiod_discipline_supervisor` WRITE;
/*!40000 ALTER TABLE `student_subperiod_discipline_supervisor` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_subperiod_discipline_supervisor` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_subperiod_subject_skill_grade`
--

DROP TABLE IF EXISTS `student_subperiod_subject_skill_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_subperiod_subject_skill_grade` (
  `serial_sbg` int(11) NOT NULL AUTO_INCREMENT,
  `serial_lsc` int(11) DEFAULT NULL,
  `serial_osc` int(11) DEFAULT NULL,
  `serial_yss` int(11) DEFAULT NULL,
  `serial_sbp` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `status_sbg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_sbg`),
  KEY `fk_relationship_1323` (`serial_sbp`),
  KEY `fk_relationship_3243` (`serial_yss`),
  KEY `fk_relationship_3253` (`serial_osc`),
  KEY `fk_relationship_3263` (`serial_lsc`),
  KEY `fk_relationship_3273` (`serial_std`),
  CONSTRAINT `fk_relationship_1323` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`),
  CONSTRAINT `fk_relationship_3243` FOREIGN KEY (`serial_yss`) REFERENCES `year_subject_skills` (`serial_yss`),
  CONSTRAINT `fk_relationship_3253` FOREIGN KEY (`serial_osc`) REFERENCES `level_opt_skill_criteria` (`serial_osc`),
  CONSTRAINT `fk_relationship_3263` FOREIGN KEY (`serial_lsc`) REFERENCES `level_skill_grade_criteria` (`serial_lsc`),
  CONSTRAINT `fk_relationship_3273` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_subperiod_subject_skill_grade`
--

LOCK TABLES `student_subperiod_subject_skill_grade` WRITE;
/*!40000 ALTER TABLE `student_subperiod_subject_skill_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_subperiod_subject_skill_grade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_weight_and_height_by_course`
--

DROP TABLE IF EXISTS `student_weight_and_height_by_course`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_weight_and_height_by_course` (
  `serial_swh` int(11) NOT NULL AUTO_INCREMENT,
  `serial_whm` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `height_swh` decimal(5,2) DEFAULT NULL,
  `weight_swh` decimal(5,2) DEFAULT NULL,
  `bmi_swh` decimal(4,2) DEFAULT NULL,
  `percentile_swh` decimal(5,2) DEFAULT NULL,
  `date_swh` date NOT NULL,
  `status_swh` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_swh`),
  KEY `fk_relationship_8888` (`serial_whm`),
  KEY `fk_relationship_8889` (`serial_std`),
  CONSTRAINT `fk_relationship_8888` FOREIGN KEY (`serial_whm`) REFERENCES `weight_and_height_measurement_by_course` (`serial_whm`),
  CONSTRAINT `fk_relationship_8889` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_weight_and_height_by_course`
--

LOCK TABLES `student_weight_and_height_by_course` WRITE;
/*!40000 ALTER TABLE `student_weight_and_height_by_course` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_weight_and_height_by_course` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_year`
--

DROP TABLE IF EXISTS `student_year`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_year` (
  `folio_number_sty` varchar(20) DEFAULT NULL,
  `matricule_number_sty` varchar(20) DEFAULT NULL,
  `is_listener_sty` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `comment_sty` text,
  `serial_std` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `serial_pag` int(11) DEFAULT NULL,
  `status_sty` enum('ACCEPTED','REGISTERED','MATRICULE','RETIRED') NOT NULL,
  `registration_type_sty` enum('ORDINARY','PASS','EXCEPTIONAL') NOT NULL DEFAULT 'ORDINARY',
  `debts_checked_sty` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `matricule_date_sty` date DEFAULT NULL,
  PRIMARY KEY (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_291` (`serial_pag`),
  KEY `fk_relationship_75` (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_291` FOREIGN KEY (`serial_pag`) REFERENCES `payment_agreement_group` (`serial_pag`),
  CONSTRAINT `fk_relationship_74` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`),
  CONSTRAINT `fk_relationship_75` FOREIGN KEY (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year_specialty` (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_year`
--

LOCK TABLES `student_year` WRITE;
/*!40000 ALTER TABLE `student_year` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_year` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_year_debts`
--

DROP TABLE IF EXISTS `student_year_debts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_year_debts` (
  `serial_deb` int(11) NOT NULL AUTO_INCREMENT,
  `serial_std` int(11) DEFAULT NULL,
  `serial_ypc` int(11) DEFAULT NULL,
  `serial_pct` int(11) DEFAULT NULL,
  `total_deb` decimal(10,2) NOT NULL,
  `total_taxes_deb` decimal(10,2) NOT NULL,
  `article_quantity_deb` decimal(6,2) DEFAULT NULL,
  `start_date_deb` date NOT NULL,
  `status_deb` enum('PENDING','PAID','INACTIVE') NOT NULL DEFAULT 'PENDING',
  PRIMARY KEY (`serial_deb`),
  KEY `fk_relationship_102` (`serial_ypc`),
  KEY `fk_relationship_103` (`serial_std`),
  CONSTRAINT `fk_relationship_102` FOREIGN KEY (`serial_ypc`) REFERENCES `year_level_specialty_payment_concept` (`serial_ypc`),
  CONSTRAINT `fk_relationship_103` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_year_debts`
--

LOCK TABLES `student_year_debts` WRITE;
/*!40000 ALTER TABLE `student_year_debts` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_year_debts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_year_discount`
--

DROP TABLE IF EXISTS `student_year_discount`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_year_discount` (
  `serial_std` int(11) NOT NULL,
  `serial_ydc` int(11) NOT NULL,
  `status_syn` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_std`,`serial_ydc`),
  KEY `fk_relationship_228` (`serial_ydc`),
  CONSTRAINT `fk_relationship_228` FOREIGN KEY (`serial_ydc`) REFERENCES `year_discount` (`serial_ydc`),
  CONSTRAINT `fk_relationship_229` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_year_discount`
--

LOCK TABLES `student_year_discount` WRITE;
/*!40000 ALTER TABLE `student_year_discount` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_year_discount` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_year_discount_values`
--

DROP TABLE IF EXISTS `student_year_discount_values`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_year_discount_values` (
  `serial_sva` int(11) NOT NULL AUTO_INCREMENT,
  `serial_pct` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_ydc` int(11) DEFAULT NULL,
  `discount_month_ydv` char(3) NOT NULL,
  `value_ydv` decimal(10,2) NOT NULL,
  `comment_ydv` varchar(128) DEFAULT NULL,
  `status_ydv` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_sva`),
  KEY `fk_relationship_230` (`serial_std`,`serial_ydc`),
  KEY `fk_relationship_235` (`serial_pct`),
  CONSTRAINT `fk_relationship_230` FOREIGN KEY (`serial_std`, `serial_ydc`) REFERENCES `student_year_discount` (`serial_std`, `serial_ydc`),
  CONSTRAINT `fk_relationship_235` FOREIGN KEY (`serial_pct`) REFERENCES `payment_concept` (`serial_pct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_year_discount_values`
--

LOCK TABLES `student_year_discount_values` WRITE;
/*!40000 ALTER TABLE `student_year_discount_values` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_year_discount_values` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_year_document`
--

DROP TABLE IF EXISTS `student_year_document`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_year_document` (
  `serial_yqd` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `delivered_syd` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `filename_syd` varchar(1024) DEFAULT NULL,
  `status_syd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_yqd`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_159` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_159` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_160` FOREIGN KEY (`serial_yqd`) REFERENCES `year_qualifying_document` (`serial_yqd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_year_document`
--

LOCK TABLES `student_year_document` WRITE;
/*!40000 ALTER TABLE `student_year_document` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_year_document` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_year_special_grade`
--

DROP TABLE IF EXISTS `student_year_special_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_year_special_grade` (
  `serial_ysg` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `grade_sys` decimal(7,3) DEFAULT NULL,
  `status_sys` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ysg`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_180` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_179` FOREIGN KEY (`serial_ysg`) REFERENCES `year_special_grade` (`serial_ysg`),
  CONSTRAINT `fk_relationship_180` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_year_special_grade`
--

LOCK TABLES `student_year_special_grade` WRITE;
/*!40000 ALTER TABLE `student_year_special_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_year_special_grade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `student_year_subject_criteria_grade`
--

DROP TABLE IF EXISTS `student_year_subject_criteria_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `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`),
  CONSTRAINT `fk_syc_serial_lsc` FOREIGN KEY (`serial_lsc`) REFERENCES `level_skill_grade_criteria` (`serial_lsc`),
  CONSTRAINT `fk_syc_serial_osb` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`),
  CONSTRAINT `fk_syc_serial_sbc` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_syc_serial_scy` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`),
  CONSTRAINT `fk_syc_serial_std` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `student_year_subject_criteria_grade`
--

LOCK TABLES `student_year_subject_criteria_grade` WRITE;
/*!40000 ALTER TABLE `student_year_subject_criteria_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `student_year_subject_criteria_grade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `study_place`
--

DROP TABLE IF EXISTS `study_place`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `study_place` (
  `serial_stp` int(11) NOT NULL AUTO_INCREMENT,
  `name_stp` varchar(128) NOT NULL,
  `description_stp` text NOT NULL,
  `available_stp` enum('YES','NO') NOT NULL DEFAULT 'YES',
  `status_stp` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_stp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `study_place`
--

LOCK TABLES `study_place` WRITE;
/*!40000 ALTER TABLE `study_place` DISABLE KEYS */;
/*!40000 ALTER TABLE `study_place` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject`
--

DROP TABLE IF EXISTS `subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject` (
  `serial_sbj` int(11) NOT NULL AUTO_INCREMENT,
  `serial_csb` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `order_sbj` int(2) DEFAULT NULL,
  `status_sbj` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_sbj`),
  KEY `fk_subject_fo__level` (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_year_subject` (`serial_csb`),
  CONSTRAINT `fk_subject_fo__level` FOREIGN KEY (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year_specialty` (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_year_subject` FOREIGN KEY (`serial_csb`) REFERENCES `cat_subject` (`serial_csb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject`
--

LOCK TABLES `subject` WRITE;
/*!40000 ALTER TABLE `subject` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `subject_trg` BEFORE UPDATE ON `subject` FOR EACH ROW BEGIN

	

	IF NEW.status_sbj = 'INACTIVE' THEN

	UPDATE subject_course sbc

	SET sbc.status_sbc = 'INACTIVE'

	WHERE sbc.serial_sbj = OLD.serial_sbj;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `subject_course`
--

DROP TABLE IF EXISTS `subject_course`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_course` (
  `serial_sbc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_sbj` int(11) DEFAULT NULL,
  `serial_crs` int(11) DEFAULT NULL,
  `serial_aca` int(11) DEFAULT NULL,
  `serial_emp` int(11) DEFAULT NULL,
  `status_sbc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `grade_type_sbc` enum('QUALITATIVE','QUANTITATIVE') NOT NULL DEFAULT 'QUANTITATIVE',
  `hours_week_sbc` int(11) NOT NULL,
  `hours_distribution_sbc` varchar(512) DEFAULT NULL,
  PRIMARY KEY (`serial_sbc`),
  KEY `fk_course_with_subject` (`serial_crs`),
  KEY `fk_is_teacher` (`serial_aca`,`serial_emp`),
  KEY `fk_subject_for_course` (`serial_sbj`),
  CONSTRAINT `fk_course_with_subject` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`),
  CONSTRAINT `fk_is_teacher` FOREIGN KEY (`serial_aca`, `serial_emp`) REFERENCES `employee_area` (`serial_aca`, `serial_emp`),
  CONSTRAINT `fk_subject_for_course` FOREIGN KEY (`serial_sbj`) REFERENCES `subject` (`serial_sbj`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_course`
--

LOCK TABLES `subject_course` WRITE;
/*!40000 ALTER TABLE `subject_course` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_course` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `subject_course_trg` BEFORE UPDATE ON `subject_course` FOR EACH ROW BEGIN

	

	IF NEW.status_sbc = 'INACTIVE' THEN

		UPDATE subject_course_period scp

		SET scp.status_scp = 'INACTIVE',

			scp.weight_scp = 0

		WHERE scp.serial_sbc = OLD.serial_sbc;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `subject_course_period`
--

DROP TABLE IF EXISTS `subject_course_period`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_course_period` (
  `serial_prd` int(11) NOT NULL,
  `serial_sbc` int(11) NOT NULL,
  `status_scp` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `weight_scp` decimal(5,2) DEFAULT NULL,
  `optional_activities_number_scp` smallint(3) DEFAULT NULL,
  PRIMARY KEY (`serial_prd`,`serial_sbc`),
  KEY `fk_relationship_72` (`serial_sbc`),
  CONSTRAINT `fk_relationship_71` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  CONSTRAINT `fk_relationship_72` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_course_period`
--

LOCK TABLES `subject_course_period` WRITE;
/*!40000 ALTER TABLE `subject_course_period` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_course_period` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_course_range_observation`
--

DROP TABLE IF EXISTS `subject_course_range_observation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_course_range_observation` (
  `serial_sbc` int(11) NOT NULL,
  `serial_qeq` int(11) NOT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_sbp` int(11) DEFAULT NULL,
  `observation_sbr` text,
  KEY `fk_subject_course_range_observation_serial_sbc` (`serial_sbc`),
  KEY `fk_subject_course_range_observation_serial_qeq` (`serial_qeq`),
  KEY `fk_subject_course_range_observation_serial_prd` (`serial_prd`),
  KEY `fk_subject_course_range_observation_serial_sbp` (`serial_sbp`),
  CONSTRAINT `fk_subject_course_range_observation_serial_prd` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  CONSTRAINT `fk_subject_course_range_observation_serial_qeq` FOREIGN KEY (`serial_qeq`) REFERENCES `qualitative_equivalence` (`serial_qeq`),
  CONSTRAINT `fk_subject_course_range_observation_serial_sbc` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_subject_course_range_observation_serial_sbp` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_course_range_observation`
--

LOCK TABLES `subject_course_range_observation` WRITE;
/*!40000 ALTER TABLE `subject_course_range_observation` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_course_range_observation` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_course_retest`
--

DROP TABLE IF EXISTS `subject_course_retest`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_course_retest` (
  `serial_scr` int(11) NOT NULL AUTO_INCREMENT,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `description_scr` text NOT NULL,
  `sent_date_scr` date NOT NULL,
  `retest_date_scr` date NOT NULL,
  `weight_scr` decimal(5,2) NOT NULL,
  `status_scr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_scr`),
  KEY `fk_relationship_201` (`serial_prd`,`serial_sbc`),
  CONSTRAINT `fk_relationship_201` FOREIGN KEY (`serial_prd`, `serial_sbc`) REFERENCES `subject_course_period` (`serial_prd`, `serial_sbc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_course_retest`
--

LOCK TABLES `subject_course_retest` WRITE;
/*!40000 ALTER TABLE `subject_course_retest` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_course_retest` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_course_retest_student`
--

DROP TABLE IF EXISTS `subject_course_retest_student`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_course_retest_student` (
  `serial_std` int(11) NOT NULL,
  `serial_scr` int(11) NOT NULL,
  `grade_srg` decimal(8,5) NOT NULL,
  `status_srg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_std`,`serial_scr`),
  KEY `fk_relationship_202` (`serial_scr`),
  CONSTRAINT `fk_relationship_202` FOREIGN KEY (`serial_scr`) REFERENCES `subject_course_retest` (`serial_scr`),
  CONSTRAINT `fk_relationship_203` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_course_retest_student`
--

LOCK TABLES `subject_course_retest_student` WRITE;
/*!40000 ALTER TABLE `subject_course_retest_student` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_course_retest_student` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_course_strategy`
--

DROP TABLE IF EXISTS `subject_course_strategy`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_course_strategy` (
  `serial_sbc` int(11) NOT NULL,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_sbp` int(11) DEFAULT NULL,
  `strategy_sbs` text,
  KEY `fk_subject_course_strategy_serial_sbc` (`serial_sbc`),
  KEY `fk_subject_course_strategy_serial_prd` (`serial_prd`),
  KEY `fk_subject_course_strategy_serial_sbp` (`serial_sbp`),
  CONSTRAINT `fk_subject_course_strategy_serial_prd` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`),
  CONSTRAINT `fk_subject_course_strategy_serial_sbc` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_subject_course_strategy_serial_sbp` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_course_strategy`
--

LOCK TABLES `subject_course_strategy` WRITE;
/*!40000 ALTER TABLE `subject_course_strategy` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_course_strategy` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_level_restriction`
--

DROP TABLE IF EXISTS `subject_level_restriction`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_level_restriction` (
  `serial_hbg` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_lop` int(11) DEFAULT NULL,
  `status_slr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  KEY `fk_relationship_266` (`serial_lop`),
  KEY `fk_relationship_267` (`serial_sbc`),
  KEY `fk_relationship_268` (`serial_hbg`),
  CONSTRAINT `fk_relationship_266` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`),
  CONSTRAINT `fk_relationship_267` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_268` FOREIGN KEY (`serial_hbg`) REFERENCES `hour_by_group` (`serial_hbg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_level_restriction`
--

LOCK TABLES `subject_level_restriction` WRITE;
/*!40000 ALTER TABLE `subject_level_restriction` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_level_restriction` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_ministry_equivalence`
--

DROP TABLE IF EXISTS `subject_ministry_equivalence`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_ministry_equivalence` (
  `serial_lop` int(11) DEFAULT NULL,
  `serial_emp` int(11) DEFAULT NULL,
  `serial_msb` int(11) DEFAULT NULL,
  `serial_csb` int(11) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `status_sme` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `order_sme` int(11) DEFAULT NULL,
  `required_sme` enum('YES','NO') NOT NULL DEFAULT 'YES',
  KEY `fk_relationship_166` (`serial_msb`),
  KEY `fk_relationship_169` (`serial_emp`),
  KEY `fk_relationship_193` (`serial_csb`),
  KEY `fk_relationship_204` (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_247` (`serial_lop`),
  CONSTRAINT `fk_relationship_166` FOREIGN KEY (`serial_msb`) REFERENCES `ministry_subject` (`serial_msb`),
  CONSTRAINT `fk_relationship_169` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`),
  CONSTRAINT `fk_relationship_193` FOREIGN KEY (`serial_csb`) REFERENCES `cat_subject` (`serial_csb`),
  CONSTRAINT `fk_relationship_204` FOREIGN KEY (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year_specialty` (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_247` FOREIGN KEY (`serial_lop`) REFERENCES `level_optional_group` (`serial_lop`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_ministry_equivalence`
--

LOCK TABLES `subject_ministry_equivalence` WRITE;
/*!40000 ALTER TABLE `subject_ministry_equivalence` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_ministry_equivalence` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_period_activity_type`
--

DROP TABLE IF EXISTS `subject_period_activity_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_period_activity_type` (
  `serial_att` int(11) NOT NULL,
  `serial_prd` int(11) NOT NULL,
  `serial_sbc` int(11) NOT NULL,
  `weight_spa` decimal(5,2) DEFAULT NULL,
  `due_min_days_spa` int(11) NOT NULL,
  `due_max_grade_spa` int(11) NOT NULL,
  `status_spa` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `is_obligatory_spa` enum('YES','NO') NOT NULL DEFAULT 'NO',
  PRIMARY KEY (`serial_att`,`serial_prd`,`serial_sbc`),
  KEY `fk_relationship_84` (`serial_prd`,`serial_sbc`),
  CONSTRAINT `fk_relationship_84` FOREIGN KEY (`serial_prd`, `serial_sbc`) REFERENCES `subject_course_period` (`serial_prd`, `serial_sbc`),
  CONSTRAINT `fk_relationship_85` FOREIGN KEY (`serial_att`) REFERENCES `activity_type` (`serial_att`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_period_activity_type`
--

LOCK TABLES `subject_period_activity_type` WRITE;
/*!40000 ALTER TABLE `subject_period_activity_type` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_period_activity_type` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_period_exam`
--

DROP TABLE IF EXISTS `subject_period_exam`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_period_exam` (
  `serial_spx` int(11) NOT NULL AUTO_INCREMENT,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_osb` int(11) DEFAULT NULL,
  `serial_ype` int(11) DEFAULT NULL,
  `status_spx` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_spx`),
  KEY `fk_relationship_305` (`serial_ype`),
  KEY `fk_relationship_306` (`serial_sbc`),
  KEY `fk_relationship_307` (`serial_osb`),
  CONSTRAINT `fk_relationship_305` FOREIGN KEY (`serial_ype`) REFERENCES `year_period_exam_setup` (`serial_ype`),
  CONSTRAINT `fk_relationship_306` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_307` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_period_exam`
--

LOCK TABLES `subject_period_exam` WRITE;
/*!40000 ALTER TABLE `subject_period_exam` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_period_exam` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_retest_change_log`
--

DROP TABLE IF EXISTS `subject_retest_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_retest_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `serial_scr` int(11) DEFAULT NULL,
  `change_date_srl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_srl` decimal(8,5) NOT NULL,
  `comment_srl` text,
  KEY `fk_relationship_212` (`serial_std`,`serial_scr`),
  KEY `fk_relationship_213` (`serial_chr`),
  KEY `fk_relationship_214` (`serial_usr`),
  CONSTRAINT `fk_relationship_212` FOREIGN KEY (`serial_std`, `serial_scr`) REFERENCES `subject_course_retest_student` (`serial_std`, `serial_scr`),
  CONSTRAINT `fk_relationship_213` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`),
  CONSTRAINT `fk_relationship_214` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_retest_change_log`
--

LOCK TABLES `subject_retest_change_log` WRITE;
/*!40000 ALTER TABLE `subject_retest_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_retest_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_year_activity_criteria_period`
--

DROP TABLE IF EXISTS `subject_year_activity_criteria_period`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_year_activity_criteria_period` (
  `serial_att` int(11) NOT NULL,
  `serial_prd` int(11) NOT NULL,
  `serial_sbc` int(11) NOT NULL,
  `serial_sbj` int(11) NOT NULL,
  `serial_gct` int(11) NOT NULL,
  `status_acp` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `criteria_max_grade` decimal(8,5) DEFAULT NULL,
  PRIMARY KEY (`serial_att`,`serial_prd`,`serial_sbc`,`serial_sbj`,`serial_gct`),
  KEY `fk_relationship_87` (`serial_sbj`,`serial_gct`),
  CONSTRAINT `fk_relationship_86` FOREIGN KEY (`serial_att`, `serial_prd`, `serial_sbc`) REFERENCES `subject_period_activity_type` (`serial_att`, `serial_prd`, `serial_sbc`),
  CONSTRAINT `fk_relationship_87` FOREIGN KEY (`serial_sbj`, `serial_gct`) REFERENCES `subject_year_grade_criteria` (`serial_sbj`, `serial_gct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_year_activity_criteria_period`
--

LOCK TABLES `subject_year_activity_criteria_period` WRITE;
/*!40000 ALTER TABLE `subject_year_activity_criteria_period` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_year_activity_criteria_period` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subject_year_grade_criteria`
--

DROP TABLE IF EXISTS `subject_year_grade_criteria`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subject_year_grade_criteria` (
  `serial_sbj` int(11) NOT NULL,
  `serial_gct` int(11) NOT NULL,
  `status_sgc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_sbj`,`serial_gct`),
  KEY `fk_relationship_83` (`serial_gct`),
  CONSTRAINT `fk_relationship_82` FOREIGN KEY (`serial_sbj`) REFERENCES `subject` (`serial_sbj`),
  CONSTRAINT `fk_relationship_83` FOREIGN KEY (`serial_gct`) REFERENCES `grade_criteria` (`serial_gct`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subject_year_grade_criteria`
--

LOCK TABLES `subject_year_grade_criteria` WRITE;
/*!40000 ALTER TABLE `subject_year_grade_criteria` DISABLE KEYS */;
/*!40000 ALTER TABLE `subject_year_grade_criteria` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subperiod`
--

DROP TABLE IF EXISTS `subperiod`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subperiod` (
  `serial_sbp` int(11) NOT NULL AUTO_INCREMENT,
  `serial_prd` int(11) DEFAULT NULL,
  `name_sbp` varchar(128) NOT NULL,
  `start_date_sbp` date NOT NULL,
  `end_date_sbp` date NOT NULL,
  `grade_input_sbp` enum('LOCKED','UNLOCKED') NOT NULL DEFAULT 'UNLOCKED',
  `status_sbp` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_sbp`),
  KEY `fk_relationship_302` (`serial_prd`),
  CONSTRAINT `fk_relationship_302` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subperiod`
--

LOCK TABLES `subperiod` WRITE;
/*!40000 ALTER TABLE `subperiod` DISABLE KEYS */;
/*!40000 ALTER TABLE `subperiod` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subperiod_discipline`
--

DROP TABLE IF EXISTS `subperiod_discipline`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subperiod_discipline` (
  `serial_sbp` int(11) NOT NULL,
  `serial_std` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `supervisor_sbp_grade_dsc` decimal(8,5) DEFAULT NULL,
  `subjects_sbp_grade_dsc` decimal(8,5) DEFAULT NULL,
  `course_director_sbp_grade_dsc` decimal(8,5) DEFAULT NULL,
  `general_sbp_grade_dsc` decimal(8,5) DEFAULT NULL,
  `adjustment_sbp_dsc` decimal(8,5) DEFAULT NULL,
  PRIMARY KEY (`serial_sbp`,`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_530` (`serial_std`,`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  CONSTRAINT `fk_relationship_501` FOREIGN KEY (`serial_sbp`) REFERENCES `subperiod` (`serial_sbp`),
  CONSTRAINT `fk_relationship_530` FOREIGN KEY (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `student_year` (`serial_std`, `serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subperiod_discipline`
--

LOCK TABLES `subperiod_discipline` WRITE;
/*!40000 ALTER TABLE `subperiod_discipline` DISABLE KEYS */;
/*!40000 ALTER TABLE `subperiod_discipline` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subperiod_discipline_change_log`
--

DROP TABLE IF EXISTS `subperiod_discipline_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subperiod_discipline_change_log` (
  `serial_usr` int(11) DEFAULT NULL,
  `serial_chr` int(11) DEFAULT NULL,
  `serial_cdd` int(11) DEFAULT NULL,
  `serial_sdg` int(11) DEFAULT NULL,
  `serial_sds` int(11) DEFAULT NULL,
  `change_date_sdcl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_grade_sdcl` decimal(8,5) NOT NULL,
  `comment_sdcl` text,
  KEY `fk_relationship_serial_usr_sdcl` (`serial_usr`),
  KEY `fk_relationship_serial_cdd_sdcl` (`serial_cdd`),
  KEY `fk_relationship_serial_sdg_sdcl` (`serial_sdg`),
  KEY `fk_relationship_serial_sds_sdcl` (`serial_sds`),
  KEY `fk_relationship_serial_chr_sdcl` (`serial_chr`),
  CONSTRAINT `fk_relationship_serial_cdd_sdcl` FOREIGN KEY (`serial_cdd`) REFERENCES `student_subperiod_discipline_course_director` (`serial_cdd`),
  CONSTRAINT `fk_relationship_serial_chr_sdcl` FOREIGN KEY (`serial_chr`) REFERENCES `change_reason` (`serial_chr`),
  CONSTRAINT `fk_relationship_serial_sdg_sdcl` FOREIGN KEY (`serial_sdg`) REFERENCES `student_subperiod_discipline_subject` (`serial_sdg`),
  CONSTRAINT `fk_relationship_serial_sds_sdcl` FOREIGN KEY (`serial_sds`) REFERENCES `student_subperiod_discipline_supervisor` (`serial_sds`),
  CONSTRAINT `fk_relationship_serial_usr_sdcl` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subperiod_discipline_change_log`
--

LOCK TABLES `subperiod_discipline_change_log` WRITE;
/*!40000 ALTER TABLE `subperiod_discipline_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `subperiod_discipline_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `syllabus_files`
--

DROP TABLE IF EXISTS `syllabus_files`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `syllabus_files` (
  `serial_syf` int(11) NOT NULL AUTO_INCREMENT,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_osb` int(11) DEFAULT NULL,
  `name_syf` varchar(256) NOT NULL,
  `description_syf` text NOT NULL,
  `filename_syf` varchar(128) NOT NULL,
  `status_syf` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_syf`),
  KEY `fk_relationship_128` (`serial_osb`),
  KEY `fk_relationship_129` (`serial_sbc`),
  CONSTRAINT `fk_relationship_128` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`),
  CONSTRAINT `fk_relationship_129` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `syllabus_files`
--

LOCK TABLES `syllabus_files` WRITE;
/*!40000 ALTER TABLE `syllabus_files` DISABLE KEYS */;
/*!40000 ALTER TABLE `syllabus_files` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `syllabus_files_change_log`
--

DROP TABLE IF EXISTS `syllabus_files_change_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `syllabus_files_change_log` (
  `serial_syf` int(11) DEFAULT NULL,
  `serial_usr` int(11) DEFAULT NULL,
  `change_date_scl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `old_data_scl` text NOT NULL,
  KEY `fk_relationship_132` (`serial_syf`),
  KEY `fk_relationship_133` (`serial_usr`),
  CONSTRAINT `fk_relationship_132` FOREIGN KEY (`serial_syf`) REFERENCES `syllabus_files` (`serial_syf`),
  CONSTRAINT `fk_relationship_133` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `syllabus_files_change_log`
--

LOCK TABLES `syllabus_files_change_log` WRITE;
/*!40000 ALTER TABLE `syllabus_files_change_log` DISABLE KEYS */;
/*!40000 ALTER TABLE `syllabus_files_change_log` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `taxes`
--

DROP TABLE IF EXISTS `taxes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `taxes` (
  `serial_tax` int(11) NOT NULL AUTO_INCREMENT,
  `name_tax` varchar(256) NOT NULL,
  `description_tax` text NOT NULL,
  `status_tax` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_tax`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `taxes`
--

LOCK TABLES `taxes` WRITE;
/*!40000 ALTER TABLE `taxes` DISABLE KEYS */;
/*!40000 ALTER TABLE `taxes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `teacher_degree`
--

DROP TABLE IF EXISTS `teacher_degree`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `teacher_degree` (
  `serial_tdg` int(11) NOT NULL AUTO_INCREMENT,
  `name_tdg` varchar(255) NOT NULL,
  `status_tdg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_tdg`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `teacher_degree`
--

LOCK TABLES `teacher_degree` WRITE;
/*!40000 ALTER TABLE `teacher_degree` DISABLE KEYS */;
INSERT INTO `teacher_degree` VALUES (1,'Licenciado en Ciencias de la Educación','ACTIVE'),(2,'Profesores de segunda enseñanza','ACTIVE'),(3,'Otros Títulos en CCEE con 4 o más años de estudio','ACTIVE'),(4,'Profesores de Primaria(Ins.Pedagógico)','ACTIVE'),(5,'Tecnológico Educativo','ACTIVE'),(6,'Auxiliar Pedagógico','ACTIVE'),(7,'Asistente Pedagógico','ACTIVE'),(8,'Facilitador Pedagógico','ACTIVE'),(9,'Bachiller en Ciencias de la Educación','ACTIVE'),(10,'Normalista rural','ACTIVE'),(11,'Doctorado en ciencias de la educación','ACTIVE');
/*!40000 ALTER TABLE `teacher_degree` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `teacher_hours_year`
--

DROP TABLE IF EXISTS `teacher_hours_year`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `teacher_hours_year` (
  `serial_thy` int(11) NOT NULL AUTO_INCREMENT,
  `serial_emp` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `start_hour_thy` time NOT NULL,
  `end_hour_thy` time NOT NULL,
  `status_thy` enum('ACTIVE','INACTIVE','ASSIGNED') NOT NULL DEFAULT 'ACTIVE',
  `labor_day_thy` enum('MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY','SUNDAY') NOT NULL,
  PRIMARY KEY (`serial_thy`),
  KEY `fk_relationship_69` (`serial_emp`),
  KEY `fk_relationship_70` (`serial_scy`),
  CONSTRAINT `fk_relationship_69` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`),
  CONSTRAINT `fk_relationship_70` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `teacher_hours_year`
--

LOCK TABLES `teacher_hours_year` WRITE;
/*!40000 ALTER TABLE `teacher_hours_year` DISABLE KEYS */;
/*!40000 ALTER TABLE `teacher_hours_year` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `teacher_master_degree`
--

DROP TABLE IF EXISTS `teacher_master_degree`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `teacher_master_degree` (
  `serial_tmd` int(11) NOT NULL AUTO_INCREMENT,
  `name_tmd` varchar(255) NOT NULL,
  `status_tmd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_tmd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `teacher_master_degree`
--

LOCK TABLES `teacher_master_degree` WRITE;
/*!40000 ALTER TABLE `teacher_master_degree` DISABLE KEYS */;
/*!40000 ALTER TABLE `teacher_master_degree` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `teacher_specialty`
--

DROP TABLE IF EXISTS `teacher_specialty`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `teacher_specialty` (
  `serial_tst` int(11) NOT NULL AUTO_INCREMENT,
  `name_tst` varchar(255) NOT NULL,
  `status_tst` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_tst`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `teacher_specialty`
--

LOCK TABLES `teacher_specialty` WRITE;
/*!40000 ALTER TABLE `teacher_specialty` DISABLE KEYS */;
/*!40000 ALTER TABLE `teacher_specialty` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `type_publicity`
--

DROP TABLE IF EXISTS `type_publicity`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `type_publicity` (
  `serial_typu` int(11) NOT NULL AUTO_INCREMENT,
  `name_typu` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`serial_typu`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `type_publicity`
--

LOCK TABLES `type_publicity` WRITE;
/*!40000 ALTER TABLE `type_publicity` DISABLE KEYS */;
/*!40000 ALTER TABLE `type_publicity` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `type_report`
--

DROP TABLE IF EXISTS `type_report`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `type_report` (
  `serial_tyrp` int(11) NOT NULL,
  `name_report` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`serial_tyrp`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `type_report`
--

LOCK TABLES `type_report` WRITE;
/*!40000 ALTER TABLE `type_report` DISABLE KEYS */;
/*!40000 ALTER TABLE `type_report` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `university`
--

DROP TABLE IF EXISTS `university`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `university` (
  `serial_unv` int(11) NOT NULL AUTO_INCREMENT,
  `name_unv` varchar(255) NOT NULL,
  `status_unv` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_unv`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `university`
--

LOCK TABLES `university` WRITE;
/*!40000 ALTER TABLE `university` DISABLE KEYS */;
INSERT INTO `university` VALUES (1,'Escuela Politécnica del Ejército','ACTIVE'),(2,'Escuela Politécnica Nacional','ACTIVE'),(3,'Universidad Central del Ecuador','ACTIVE'),(4,'Universidad Tecnológica Equinoccial','ACTIVE'),(5,'Escuela Politécnica Javeriana','ACTIVE'),(6,'Universidad Autónoma de Quito','ACTIVE'),(7,'Universidad Del Pacífico','ACTIVE'),(8,'Universidad Tecnológica America','ACTIVE'),(9,'Universidad Tecnológica Israel','ACTIVE'),(10,'Universidad De Especialidades Turisticas','ACTIVE'),(11,'Universidad de las Americas','ACTIVE'),(12,'Universidad Internacional del Ecuador','ACTIVE'),(13,'Universidad Internacional SEK','ACTIVE'),(14,'Universidad San Francisco de Quito','ACTIVE'),(15,'Universidad Politécnica Salesiana','ACTIVE'),(16,'Pontificia Universidad Catolica del Ecuador','ACTIVE'),(17,'Universidad Tecnológica Indoamérica','ACTIVE'),(18,'Otra','ACTIVE');
/*!40000 ALTER TABLE `university` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `use_destination`
--

DROP TABLE IF EXISTS `use_destination`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `use_destination` (
  `serial_udt` int(11) NOT NULL AUTO_INCREMENT,
  `name_udt` varchar(200) NOT NULL,
  `description_udt` text NOT NULL,
  `status_udt` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_udt`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `use_destination`
--

LOCK TABLES `use_destination` WRITE;
/*!40000 ALTER TABLE `use_destination` DISABLE KEYS */;
/*!40000 ALTER TABLE `use_destination` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user`
--

DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
  `serial_usr` int(11) NOT NULL AUTO_INCREMENT,
  `serial_emp` int(11) DEFAULT NULL,
  `serial_grd` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `username_usr` varchar(150) NOT NULL,
  `password_usr` varchar(300) DEFAULT NULL,
  `photo_usr` varchar(1024) DEFAULT NULL,
  `change_pass_usr` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `status_usr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_usr`),
  KEY `fk_employee_user2` (`serial_emp`),
  KEY `fk_guardian_user2` (`serial_grd`),
  KEY `fk_student_user2` (`serial_std`),
  CONSTRAINT `fk_employee_user2` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`),
  CONSTRAINT `fk_guardian_user2` FOREIGN KEY (`serial_grd`) REFERENCES `guardian` (`serial_grd`),
  CONSTRAINT `fk_student_user2` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user`
--

LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (1,NULL,NULL,NULL,'adminsge','81dc9bdb52d04dc20036dbd8313ed055',NULL,'NO','ACTIVE');
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user_course_comment_setup`
--

DROP TABLE IF EXISTS `user_course_comment_setup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_course_comment_setup` (
  `serial_usr` int(11) NOT NULL,
  `serial_crs` int(11) NOT NULL,
  `status_cpc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_usr`,`serial_crs`),
  KEY `fk_relationship_314` (`serial_crs`),
  CONSTRAINT `fk_relationship_313` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`),
  CONSTRAINT `fk_relationship_314` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user_course_comment_setup`
--

LOCK TABLES `user_course_comment_setup` WRITE;
/*!40000 ALTER TABLE `user_course_comment_setup` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_course_comment_setup` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user_profile`
--

DROP TABLE IF EXISTS `user_profile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_profile` (
  `serial_usr` int(11) NOT NULL,
  `serial_prf` int(11) NOT NULL,
  `status_upr` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_usr`,`serial_prf`),
  KEY `fk_for_user` (`serial_prf`),
  CONSTRAINT `fk_for_user` FOREIGN KEY (`serial_prf`) REFERENCES `profile` (`serial_prf`),
  CONSTRAINT `fk_has_profile` FOREIGN KEY (`serial_usr`) REFERENCES `user` (`serial_usr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user_profile`
--

LOCK TABLES `user_profile` WRITE;
/*!40000 ALTER TABLE `user_profile` DISABLE KEYS */;
INSERT INTO `user_profile` VALUES (1,1,'ACTIVE');
/*!40000 ALTER TABLE `user_profile` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Temporary view structure for view `view_activity_grades`
--

DROP TABLE IF EXISTS `view_activity_grades`;
/*!50001 DROP VIEW IF EXISTS `view_activity_grades`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `view_activity_grades` AS SELECT 
 1 AS `serial_scy`,
 1 AS `name_scy`,
 1 AS `serial_crs`,
 1 AS `serial_std`,
 1 AS `first_name_std`,
 1 AS `last_name_std`,
 1 AS `serial_sbc`,
 1 AS `subject_name`,
 1 AS `serial_prd`,
 1 AS `name_prd`,
 1 AS `serial_act`,
 1 AS `due_date_act`,
 1 AS `serial_att`,
 1 AS `act_grade`*/;
SET character_set_client = @saved_cs_client;

--
-- Temporary view structure for view `view_opt_activity_grades`
--

DROP TABLE IF EXISTS `view_opt_activity_grades`;
/*!50001 DROP VIEW IF EXISTS `view_opt_activity_grades`*/;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `view_opt_activity_grades` AS SELECT 
 1 AS `serial_scy`,
 1 AS `name_scy`,
 1 AS `serial_opa`,
 1 AS `due_date_opa`,
 1 AS `serial_osb`,
 1 AS `subject_name`,
 1 AS `serial_att`,
 1 AS `serial_prd`,
 1 AS `name_prd`,
 1 AS `serial_std`,
 1 AS `first_name_std`,
 1 AS `last_name_std`,
 1 AS `act_grade`*/;
SET character_set_client = @saved_cs_client;

--
-- Table structure for table `visits_medical_center`
--

DROP TABLE IF EXISTS `visits_medical_center`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `visits_medical_center` (
  `serial_vmc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_mdf` int(11) DEFAULT NULL,
  `date_vmc` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `reason_vmc` text NOT NULL,
  `diagnosis_vmc` text NOT NULL,
  `filename_att_vmc` varchar(100) DEFAULT NULL,
  `attachment_vmc` varchar(100) DEFAULT NULL,
  `height_vmc` decimal(5,2) DEFAULT NULL,
  `weight_vmc` decimal(5,2) DEFAULT NULL,
  `bmi_vmc` decimal(3,2) DEFAULT NULL,
  `percentile_vmc` decimal(3,2) DEFAULT NULL,
  PRIMARY KEY (`serial_vmc`),
  KEY `fk_relationship_197` (`serial_mdf`),
  CONSTRAINT `fk_relationship_197` FOREIGN KEY (`serial_mdf`) REFERENCES `medical_file` (`serial_mdf`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `visits_medical_center`
--

LOCK TABLES `visits_medical_center` WRITE;
/*!40000 ALTER TABLE `visits_medical_center` DISABLE KEYS */;
/*!40000 ALTER TABLE `visits_medical_center` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `web_pre_registration`
--

DROP TABLE IF EXISTS `web_pre_registration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `web_pre_registration` (
  `serial_wpr` int(11) NOT NULL AUTO_INCREMENT,
  `serial_wus` int(11) DEFAULT NULL,
  `serial_nnt` int(11) DEFAULT NULL,
  `serial_dgr` int(11) DEFAULT NULL,
  `serial_ste` int(11) DEFAULT NULL,
  `id_wpr` varchar(10) DEFAULT NULL,
  `serial_spt` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `first_name_wpr` varchar(512) NOT NULL,
  `last_name_wpr` varchar(512) NOT NULL,
  `birthdate_wpr` date NOT NULL,
  `gender_wpr` enum('MALE','FEMALE') NOT NULL,
  `address_wpr` text NOT NULL,
  `phone_wpr` varchar(30) NOT NULL,
  `first_name_father_wpr` varchar(100) DEFAULT NULL,
  `last_name_father_wpr` varchar(100) DEFAULT NULL,
  `first_name_mother_wpr` varchar(100) DEFAULT NULL,
  `last_name_mother_wpr` varchar(100) DEFAULT NULL,
  `city_birth_wpr` varchar(100) DEFAULT NULL,
  `blood_type_wpr` varchar(10) DEFAULT NULL,
  `allergies_wpr` text,
  `lives_with_wpr` enum('PARENT','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') NOT NULL,
  `photo_wpr` varchar(1024) DEFAULT NULL,
  `email_wpr` varchar(256) DEFAULT NULL,
  `rep_first_name_wpr` varchar(100) NOT NULL,
  `rep_last_name_wpr` varchar(100) NOT NULL,
  `rep_relationship_wpr` enum('PARENT','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') NOT NULL,
  `rep_birthdate_wpr` date DEFAULT NULL,
  `rep_city_birth_wpr` varchar(100) DEFAULT NULL,
  `rep_marital_status_wpr` enum('SINGLE','MARRIED','DIVORCED','WIDOWED','UNMARRIED PARTNERS') NOT NULL,
  `rep_occupation_wpr` varchar(100) DEFAULT NULL,
  `rep_address_wpr` text NOT NULL,
  `rep_phone_wpr` varchar(13) NOT NULL,
  `rep_mobile_wpr` varchar(13) DEFAULT NULL,
  `rep_company_name_wpr` varchar(80) DEFAULT NULL,
  `rep_company_activity_wpr` text,
  `rep_company_phone_wpr` varchar(13) DEFAULT NULL,
  `rep_photo_wpr` varchar(1024) DEFAULT NULL,
  `rep_gender_wpr` enum('MALE','FEMALE') NOT NULL,
  `rep_id_wpr` varchar(13) NOT NULL,
  `rep_email_wpr` varchar(256) DEFAULT NULL,
  `is_listener_wpr` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `submitted_docs_wpr` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `pre_approved_wpr` enum('YES','NO','PENDING') NOT NULL DEFAULT 'PENDING',
  `pre_approved_comment_wpr` text,
  `approved_wpr` enum('YES','NO','PENDING') NOT NULL DEFAULT 'PENDING',
  `approved_comment_wpr` text,
  PRIMARY KEY (`serial_wpr`),
  KEY `fk_relationship_205` (`serial_dgr`),
  KEY `fk_relationship_206` (`serial_nnt`),
  KEY `fk_relationship_207` (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_208` (`serial_wus`),
  KEY `fk_relationship_242` (`serial_ste`),
  CONSTRAINT `fk_relationship_205` FOREIGN KEY (`serial_dgr`) REFERENCES `degree` (`serial_dgr`),
  CONSTRAINT `fk_relationship_206` FOREIGN KEY (`serial_nnt`) REFERENCES `nationality` (`serial_nnt`),
  CONSTRAINT `fk_relationship_207` FOREIGN KEY (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year_specialty` (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_208` FOREIGN KEY (`serial_wus`) REFERENCES `web_user` (`serial_wus`),
  CONSTRAINT `fk_relationship_242` FOREIGN KEY (`serial_ste`) REFERENCES `state` (`serial_ste`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `web_pre_registration`
--

LOCK TABLES `web_pre_registration` WRITE;
/*!40000 ALTER TABLE `web_pre_registration` DISABLE KEYS */;
/*!40000 ALTER TABLE `web_pre_registration` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `web_user`
--

DROP TABLE IF EXISTS `web_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `web_user` (
  `serial_wus` int(11) NOT NULL AUTO_INCREMENT,
  `id_wus` varchar(13) NOT NULL,
  `first_name_wus` varchar(512) NOT NULL,
  `last_name_wus` varchar(512) NOT NULL,
  `birthdate_wus` date NOT NULL,
  `gender_wus` enum('MALE','FEMALE') NOT NULL,
  `address_wus` text NOT NULL,
  `phone_wus` varchar(30) NOT NULL,
  `status_wus` enum('ACTIVE','INACTIVE','PENDING','BLOCKED') NOT NULL DEFAULT 'PENDING',
  `occupation_wus` varchar(50) DEFAULT NULL,
  `company_name_wus` varchar(100) DEFAULT NULL,
  `company_activity_wus` varchar(80) DEFAULT NULL,
  `company_phone_wus` varchar(13) DEFAULT NULL,
  `email_wus` varchar(128) NOT NULL,
  `password_wus` varchar(256) NOT NULL,
  `authentication_key_wus` varchar(1024) NOT NULL,
  PRIMARY KEY (`serial_wus`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `web_user`
--

LOCK TABLES `web_user` WRITE;
/*!40000 ALTER TABLE `web_user` DISABLE KEYS */;
/*!40000 ALTER TABLE `web_user` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `web_user_aspirant`
--

DROP TABLE IF EXISTS `web_user_aspirant`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `web_user_aspirant` (
  `serial_wus` int(11) NOT NULL AUTO_INCREMENT,
  `email_wus` varchar(128) NOT NULL,
  `serial_asgu` int(11) DEFAULT NULL,
  `id_asgu` varchar(13) DEFAULT NULL,
  `password_wus` varchar(256) NOT NULL,
  `authentication_key_wus` varchar(1024) DEFAULT NULL,
  `insert_date_wus` datetime DEFAULT NULL,
  `modification_date_wus` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`serial_wus`),
  KEY `fk_serial_asgu2_idx` (`serial_asgu`),
  CONSTRAINT `fk_serial_asgu2` FOREIGN KEY (`serial_asgu`) REFERENCES `aspirant_guardian` (`serial_asgu`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='web_user';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `web_user_aspirant`
--

LOCK TABLES `web_user_aspirant` WRITE;
/*!40000 ALTER TABLE `web_user_aspirant` DISABLE KEYS */;
/*!40000 ALTER TABLE `web_user_aspirant` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `weight_and_height_measurement_by_course`
--

DROP TABLE IF EXISTS `weight_and_height_measurement_by_course`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `weight_and_height_measurement_by_course` (
  `serial_whm` int(11) NOT NULL AUTO_INCREMENT,
  `serial_crs` int(11) NOT NULL,
  `date_whm` date NOT NULL,
  `status_whm` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_whm`),
  KEY `fk_relationship_8877` (`serial_crs`),
  CONSTRAINT `fk_relationship_8877` FOREIGN KEY (`serial_crs`) REFERENCES `course` (`serial_crs`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `weight_and_height_measurement_by_course`
--

LOCK TABLES `weight_and_height_measurement_by_course` WRITE;
/*!40000 ALTER TABLE `weight_and_height_measurement_by_course` DISABLE KEYS */;
/*!40000 ALTER TABLE `weight_and_height_measurement_by_course` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_aspirant_documents`
--

DROP TABLE IF EXISTS `year_aspirant_documents`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_aspirant_documents` (
  `serial_yasdc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_dcm` int(11) DEFAULT NULL,
  `status_ypd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `serial_typu` int(11) DEFAULT NULL,
  PRIMARY KEY (`serial_yasdc`),
  KEY `fk_relationship_261_idx` (`serial_scy`),
  KEY `fk_documetns_idx` (`serial_dcm`),
  KEY `fk_typu_idx` (`serial_typu`),
  CONSTRAINT `fk_documetns` FOREIGN KEY (`serial_dcm`) REFERENCES `documents` (`serial_dcm`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_relationship_261_scy` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`),
  CONSTRAINT `fk_typu` FOREIGN KEY (`serial_typu`) REFERENCES `type_publicity` (`serial_typu`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_aspirant_documents`
--

LOCK TABLES `year_aspirant_documents` WRITE;
/*!40000 ALTER TABLE `year_aspirant_documents` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_aspirant_documents` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_concept_taxes`
--

DROP TABLE IF EXISTS `year_concept_taxes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_concept_taxes` (
  `serial_ypc` int(11) DEFAULT NULL,
  `serial_tax` int(11) DEFAULT NULL,
  `value_yct` decimal(5,2) DEFAULT NULL,
  `status_yct` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  `serial_pct` int(11) DEFAULT NULL,
  KEY `fk_relationship_93` (`serial_tax`),
  KEY `fk_relationship_94` (`serial_ypc`),
  CONSTRAINT `fk_relationship_93` FOREIGN KEY (`serial_tax`) REFERENCES `taxes` (`serial_tax`),
  CONSTRAINT `fk_relationship_94` FOREIGN KEY (`serial_ypc`) REFERENCES `year_level_specialty_payment_concept` (`serial_ypc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_concept_taxes`
--

LOCK TABLES `year_concept_taxes` WRITE;
/*!40000 ALTER TABLE `year_concept_taxes` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_concept_taxes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_discount`
--

DROP TABLE IF EXISTS `year_discount`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_discount` (
  `serial_ydc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_dsc` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `type_ydc` enum('PERCENTAGE','FIXED') NOT NULL,
  `value_ydc` decimal(10,2) NOT NULL,
  `days_before_limit_ydc` int(11) DEFAULT NULL,
  `status_ydc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ydc`),
  KEY `fk_relationship_224` (`serial_scy`),
  KEY `fk_relationship_225` (`serial_dsc`),
  CONSTRAINT `fk_relationship_224` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`),
  CONSTRAINT `fk_relationship_225` FOREIGN KEY (`serial_dsc`) REFERENCES `discount` (`serial_dsc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_discount`
--

LOCK TABLES `year_discount` WRITE;
/*!40000 ALTER TABLE `year_discount` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_discount` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_grade_subject`
--

DROP TABLE IF EXISTS `year_grade_subject`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_grade_subject` (
  `serial_ygs` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_csb` int(11) DEFAULT NULL,
  `status_ygs` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ygs`),
  KEY `fk_relationship_174` (`serial_csb`),
  KEY `fk_relationship_175` (`serial_scy`),
  CONSTRAINT `fk_relationship_174` FOREIGN KEY (`serial_csb`) REFERENCES `cat_subject` (`serial_csb`),
  CONSTRAINT `fk_relationship_175` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_grade_subject`
--

LOCK TABLES `year_grade_subject` WRITE;
/*!40000 ALTER TABLE `year_grade_subject` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_grade_subject` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `year_grade_subject_trg` BEFORE UPDATE ON `year_grade_subject` FOR EACH ROW BEGIN

	

	IF NEW.status_ygs LIKE '%INACTIVE%' THEN

		UPDATE grade_subject_score gss

		SET gss.status_gss = 'INACTIVE'

		WHERE gss.serial_ygs = OLD.serial_ygs;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `year_level_specialty_payment_concept`
--

DROP TABLE IF EXISTS `year_level_specialty_payment_concept`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_level_specialty_payment_concept` (
  `serial_ypc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_art` int(11) DEFAULT NULL,
  `serial_pct` int(11) NOT NULL,
  `serial_spt` int(11) NOT NULL,
  `serial_lvl` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `serial_set` int(11) NOT NULL,
  `value_ypc` decimal(10,2) NOT NULL,
  `frequency_ypc` enum('ANNUAL','MONTHLY') NOT NULL,
  `repetitions_number_ypc` int(11) NOT NULL,
  `enabling_concept_ypc` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `mandatory_ypc` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `student_type_ypc` enum('NEW','OLD','BOTH') NOT NULL DEFAULT 'BOTH',
  `type_ypc` enum('ACADEMIC','NON_ACADEMIC') NOT NULL DEFAULT 'ACADEMIC',
  `serial_pcg` int(11) DEFAULT NULL,
  `status_ypc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ypc`),
  KEY `fk_relationship_90` (`serial_spt`,`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_91` (`serial_pct`),
  KEY `fk_relationship_92` (`serial_art`),
  KEY `serial_pcg` (`serial_pcg`),
  CONSTRAINT `fk_relationship_90` FOREIGN KEY (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year_specialty` (`serial_spt`, `serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_91` FOREIGN KEY (`serial_pct`) REFERENCES `payment_concept` (`serial_pct`),
  CONSTRAINT `fk_relationship_92` FOREIGN KEY (`serial_art`) REFERENCES `article` (`serial_art`),
  CONSTRAINT `year_level_specialty_payment_concept_ibfk_1` FOREIGN KEY (`serial_pcg`) REFERENCES `payment_concept_group` (`serial_pcg`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_level_specialty_payment_concept`
--

LOCK TABLES `year_level_specialty_payment_concept` WRITE;
/*!40000 ALTER TABLE `year_level_specialty_payment_concept` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_level_specialty_payment_concept` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_lunch_type_price`
--

DROP TABLE IF EXISTS `year_lunch_type_price`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_lunch_type_price` (
  `serial_ylp` int(11) NOT NULL AUTO_INCREMENT,
  `serial_clt` int(11) NOT NULL,
  `serial_scy` int(11) NOT NULL,
  `total_ylp` decimal(10,2) NOT NULL,
  `status_ylp` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ylp`),
  KEY `fk_relationship_4001` (`serial_clt`),
  KEY `fk_relationship_4002` (`serial_scy`),
  CONSTRAINT `fk_relationship_4001` FOREIGN KEY (`serial_clt`) REFERENCES `cat_lunch_type` (`serial_clt`),
  CONSTRAINT `fk_relationship_4002` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_lunch_type_price`
--

LOCK TABLES `year_lunch_type_price` WRITE;
/*!40000 ALTER TABLE `year_lunch_type_price` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_lunch_type_price` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_period_exam_setup`
--

DROP TABLE IF EXISTS `year_period_exam_setup`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_period_exam_setup` (
  `serial_ype` int(11) NOT NULL AUTO_INCREMENT,
  `serial_prd` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `description_ype` text NOT NULL,
  `weight_ype` decimal(8,5) NOT NULL,
  `status_ype` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ype`),
  KEY `fk_relationship_303` (`serial_lvl`,`serial_scy`,`serial_set`),
  KEY `fk_relationship_304` (`serial_prd`),
  CONSTRAINT `fk_relationship_303` FOREIGN KEY (`serial_lvl`, `serial_scy`, `serial_set`) REFERENCES `level_section_year` (`serial_lvl`, `serial_scy`, `serial_set`),
  CONSTRAINT `fk_relationship_304` FOREIGN KEY (`serial_prd`) REFERENCES `period` (`serial_prd`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_period_exam_setup`
--

LOCK TABLES `year_period_exam_setup` WRITE;
/*!40000 ALTER TABLE `year_period_exam_setup` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_period_exam_setup` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_pre_registration_document`
--

DROP TABLE IF EXISTS `year_pre_registration_document`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_pre_registration_document` (
  `serial_ypd` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_qdc` int(11) DEFAULT NULL,
  `status_ypd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ypd`),
  KEY `fk_relationship_261` (`serial_scy`),
  KEY `fk_relationship_262` (`serial_qdc`),
  CONSTRAINT `fk_relationship_261` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`),
  CONSTRAINT `fk_relationship_262` FOREIGN KEY (`serial_qdc`) REFERENCES `qualifying_document` (`serial_qdc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_pre_registration_document`
--

LOCK TABLES `year_pre_registration_document` WRITE;
/*!40000 ALTER TABLE `year_pre_registration_document` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_pre_registration_document` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_qualifying_document`
--

DROP TABLE IF EXISTS `year_qualifying_document`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_qualifying_document` (
  `serial_yqd` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_qdc` int(11) DEFAULT NULL,
  `status_yqd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_yqd`),
  KEY `fk_relationship_157` (`serial_scy`),
  KEY `fk_relationship_158` (`serial_qdc`),
  CONSTRAINT `fk_relationship_157` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`),
  CONSTRAINT `fk_relationship_158` FOREIGN KEY (`serial_qdc`) REFERENCES `qualifying_document` (`serial_qdc`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_qualifying_document`
--

LOCK TABLES `year_qualifying_document` WRITE;
/*!40000 ALTER TABLE `year_qualifying_document` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_qualifying_document` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_report_comment`
--

DROP TABLE IF EXISTS `year_report_comment`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_report_comment` (
  `serial_yrc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_std` int(11) DEFAULT NULL,
  `report_type_yrc` enum('SCY_RESIT_GRADE','MIN_PERIOD_GRADE','MIN_FINAL_GRADE','MIN_GRADE_SCORE','MIN_RESIT_GRADE','SCY_MATRICULATED_STD','SCY_PROMOTION_STD') NOT NULL,
  `remote_id_yrc` int(11) DEFAULT NULL,
  `comment_yrc` text NOT NULL,
  PRIMARY KEY (`serial_yrc`),
  KEY `fk_relationship_259` (`serial_std`),
  KEY `fk_relationship_260` (`serial_scy`),
  CONSTRAINT `fk_relationship_259` FOREIGN KEY (`serial_std`) REFERENCES `student` (`serial_std`),
  CONSTRAINT `fk_relationship_260` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_report_comment`
--

LOCK TABLES `year_report_comment` WRITE;
/*!40000 ALTER TABLE `year_report_comment` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_report_comment` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_resit_exam_ranges`
--

DROP TABLE IF EXISTS `year_resit_exam_ranges`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_resit_exam_ranges` (
  `serial_yre` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `lower_limit_yre` decimal(5,2) NOT NULL,
  `higher_limit_yre` decimal(5,2) NOT NULL,
  `required_grade_yre` decimal(8,5) NOT NULL,
  `type_yre` enum('SCHOOL','MINISTRY') NOT NULL DEFAULT 'SCHOOL',
  `status_yre` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_yre`),
  KEY `fk_relationship_162` (`serial_scy`),
  CONSTRAINT `fk_relationship_162` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_resit_exam_ranges`
--

LOCK TABLES `year_resit_exam_ranges` WRITE;
/*!40000 ALTER TABLE `year_resit_exam_ranges` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_resit_exam_ranges` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_special_grade`
--

DROP TABLE IF EXISTS `year_special_grade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_special_grade` (
  `serial_ysg` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `name_ysg` varchar(256) NOT NULL,
  `description_ysg` text NOT NULL,
  `status_ysg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ysg`),
  KEY `fk_relationship_178` (`serial_scy`),
  CONSTRAINT `fk_relationship_178` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_special_grade`
--

LOCK TABLES `year_special_grade` WRITE;
/*!40000 ALTER TABLE `year_special_grade` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_special_grade` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = latin1 */ ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection  = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'NO_AUTO_VALUE_ON_ZERO' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `year_special_grade_trg` BEFORE UPDATE ON `year_special_grade` FOR EACH ROW BEGIN

	

	IF NEW.status_ysg LIKE '%INACTIVE%' THEN

		UPDATE student_year_special_grade sys

		SET sys.status_sys = 'INACTIVE'

		WHERE sys.serial_ysg = OLD.serial_ysg;

	END IF;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `year_subject_classroom`
--

DROP TABLE IF EXISTS `year_subject_classroom`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_subject_classroom` (
  `serial_ysc` int(11) NOT NULL AUTO_INCREMENT,
  `serial_sbc` int(11) DEFAULT NULL,
  `serial_clr` int(11) DEFAULT NULL,
  `serial_osb` int(11) DEFAULT NULL,
  `status_ysc` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_ysc`),
  KEY `fk_relationship_163` (`serial_clr`),
  KEY `fk_relationship_164` (`serial_sbc`),
  KEY `fk_relationship_165` (`serial_osb`),
  CONSTRAINT `fk_relationship_163` FOREIGN KEY (`serial_clr`) REFERENCES `classroom` (`serial_clr`),
  CONSTRAINT `fk_relationship_164` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_165` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_subject_classroom`
--

LOCK TABLES `year_subject_classroom` WRITE;
/*!40000 ALTER TABLE `year_subject_classroom` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_subject_classroom` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_subject_skills`
--

DROP TABLE IF EXISTS `year_subject_skills`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_subject_skills` (
  `serial_yss` int(11) NOT NULL AUTO_INCREMENT,
  `serial_osb` int(11) DEFAULT NULL,
  `serial_skl` int(11) DEFAULT NULL,
  `serial_sbc` int(11) DEFAULT NULL,
  `order_yss` int(11) DEFAULT NULL,
  `status_yss` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_yss`),
  KEY `fk_relationship_320` (`serial_skl`),
  KEY `fk_relationship_321` (`serial_sbc`),
  KEY `fk_relationship_322` (`serial_osb`),
  CONSTRAINT `fk_relationship_320` FOREIGN KEY (`serial_skl`) REFERENCES `skills` (`serial_skl`),
  CONSTRAINT `fk_relationship_321` FOREIGN KEY (`serial_sbc`) REFERENCES `subject_course` (`serial_sbc`),
  CONSTRAINT `fk_relationship_322` FOREIGN KEY (`serial_osb`) REFERENCES `optional_subject` (`serial_osb`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_subject_skills`
--

LOCK TABLES `year_subject_skills` WRITE;
/*!40000 ALTER TABLE `year_subject_skills` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_subject_skills` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `year_vacations_dates`
--

DROP TABLE IF EXISTS `year_vacations_dates`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `year_vacations_dates` (
  `serial_yvd` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) NOT NULL,
  `date_yvd` date NOT NULL,
  `status_yvd` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_yvd`),
  KEY `fk_relationship_412002` (`serial_scy`),
  CONSTRAINT `fk_relationship_412002` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `year_vacations_dates`
--

LOCK TABLES `year_vacations_dates` WRITE;
/*!40000 ALTER TABLE `year_vacations_dates` DISABLE KEYS */;
/*!40000 ALTER TABLE `year_vacations_dates` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `zone_address`
--

DROP TABLE IF EXISTS `zone_address`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `zone_address` (
  `serial_zne` int(11) NOT NULL AUTO_INCREMENT,
  `name_zne` varchar(64) NOT NULL,
  `status_zne` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'INACTIVE',
  PRIMARY KEY (`serial_zne`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `zone_address`
--

LOCK TABLES `zone_address` WRITE;
/*!40000 ALTER TABLE `zone_address` DISABLE KEYS */;
INSERT INTO `zone_address` VALUES (1,'ZONA 1','ACTIVE'),(2,'ZONA 2','ACTIVE'),(3,'ZONA 3','ACTIVE'),(4,'ZONA 4','ACTIVE'),(5,'ZONA 5','ACTIVE'),(6,'ZONA 6','ACTIVE'),(7,'ZONA 7','ACTIVE'),(8,'ZONA 8','ACTIVE'),(9,'ZONA 9','ACTIVE');
/*!40000 ALTER TABLE `zone_address` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping events for database 'rutatec2'
--

--
-- Dumping routines for database 'rutatec2'
--

--
-- Final view structure for view `empleados_con_almuerzo`
--

/*!50001 DROP VIEW IF EXISTS `empleados_con_almuerzo`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8 */;
/*!50001 SET character_set_results     = utf8 */;
/*!50001 SET collation_connection      = utf8_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `empleados_con_almuerzo` AS select `emp`.`serial_emp` AS `serial_emp`,`emp`.`id_emp` AS `id_emp`,`emp`.`last_name_emp` AS `last_name_emp`,`emp`.`first_name_emp` AS `first_name_emp`,`eld`.`week_days_eld` AS `week_days_eld`,`eld`.`date_eld` AS `date_eld` from ((`employee_lunch_contract` `elc` join `employee_lunch_contract_detail` `eld` on((`elc`.`serial_elc` = `eld`.`serial_elc`))) join `employee` `emp` on((`elc`.`serial_emp` = `emp`.`serial_emp`))) where ((`elc`.`status_elc` = 'ACTIVE') and (`emp`.`status_emp` = 'ACTIVE') and (`eld`.`status_eld` = 'ACTIVE')) */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `estudiantes_con_almuerzo`
--

/*!50001 DROP VIEW IF EXISTS `estudiantes_con_almuerzo`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8 */;
/*!50001 SET character_set_results     = utf8 */;
/*!50001 SET collation_connection      = utf8_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `estudiantes_con_almuerzo` AS select `std`.`serial_std` AS `serial_std`,`std`.`id_std` AS `id_std`,`sty`.`matricule_number_sty` AS `matricule_number_sty`,`std`.`last_name_std` AS `last_name_std`,`std`.`first_name_std` AS `first_name_std`,`sld`.`week_day_sld` AS `week_day_sld`,`sld`.`date_sld` AS `date_sld` from ((((`student_lunch_contract` `slc` join `level_section_year_lunch_type` `lyt` on((`slc`.`serial_lyt` = `lyt`.`serial_lyt`))) join `student` `std` on((`slc`.`serial_std` = `std`.`serial_std`))) join `student_year` `sty` on((`sty`.`serial_std` = `std`.`serial_std`))) join `student_lunch_contract_detail` `sld` on((`slc`.`serial_slc` = `sld`.`serial_slc`))) where ((`slc`.`status_slc` = 'ACTIVE') and (`std`.`status_std` = 'ACTIVE') and (`sld`.`status_sld` = 'ACTIVE') and (`lyt`.`serial_scy` = `sty`.`serial_scy`)) */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `estudiantes_con_refrigerio`
--

/*!50001 DROP VIEW IF EXISTS `estudiantes_con_refrigerio`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = utf8 */;
/*!50001 SET character_set_results     = utf8 */;
/*!50001 SET collation_connection      = utf8_general_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `estudiantes_con_refrigerio` AS select `std`.`serial_std` AS `serial_std`,`std`.`id_std` AS `id_std`,`sty`.`matricule_number_sty` AS `matricule_number_sty`,`sfd`.`month_year_sfd` AS `month_year_sfd`,`sfd`.`start_value_sfd` AS `start_value_sfd`,`sfd`.`type_sfd` AS `type_sfd` from ((`student_refreshments_detail` `sfd` join `student` `std` on((`std`.`serial_std` = `sfd`.`serial_std`))) join `student_year` `sty` on(((`sty`.`serial_std` = `std`.`serial_std`) and (`sty`.`serial_scy` = `sfd`.`serial_scy`)))) where (`std`.`status_std` = 'ACTIVE') */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `view_activity_grades`
--

/*!50001 DROP VIEW IF EXISTS `view_activity_grades`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = latin1 */;
/*!50001 SET character_set_results     = latin1 */;
/*!50001 SET collation_connection      = latin1_swedish_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_activity_grades` AS select `scy`.`serial_scy` AS `serial_scy`,`scy`.`name_scy` AS `name_scy`,`crs`.`serial_crs` AS `serial_crs`,`stc`.`serial_std` AS `serial_std`,`std`.`first_name_std` AS `first_name_std`,`std`.`last_name_std` AS `last_name_std`,`sbc`.`serial_sbc` AS `serial_sbc`,concat(if(isnull(`csb2`.`name_csb`),_latin1'',concat(`csb2`.`name_csb`,_latin1'-')),`csb`.`name_csb`) AS `subject_name`,`prd`.`serial_prd` AS `serial_prd`,`prd`.`name_prd` AS `name_prd`,`scg`.`serial_act` AS `serial_act`,`act`.`due_date_act` AS `due_date_act`,`scg`.`serial_att` AS `serial_att`,sum(`scg`.`activity_grade_part_scg`) AS `act_grade` from (((((((((((`school_year` `scy` join `course` `crs` on(((`crs`.`serial_scy` = `scy`.`serial_scy`) and (`crs`.`status_crs` = _latin1'ACTIVE')))) join `student_by_course` `stc` on(((`stc`.`serial_crs` = `crs`.`serial_crs`) and (`stc`.`status_stc` = _latin1'ACTIVE')))) join `subject_course` `sbc` on(((`sbc`.`serial_crs` = `crs`.`serial_crs`) and (`sbc`.`status_sbc` = _latin1'ACTIVE')))) join `subject` `sbj` on(((`sbj`.`serial_sbj` = `sbc`.`serial_sbj`) and (`sbj`.`status_sbj` = _latin1'ACTIVE')))) join `cat_subject` `csb` on(((`csb`.`serial_csb` = `sbj`.`serial_csb`) and (`csb`.`status_csb` = _latin1'ACTIVE')))) left join `cat_subject` `csb2` on((`csb`.`cat_serial_csb` = `csb2`.`serial_csb`))) join `subject_course_period` `scp` on(((`scp`.`serial_sbc` = `sbc`.`serial_sbc`) and (`scp`.`status_scp` = _latin1'ACTIVE')))) join `period` `prd` on(((`prd`.`serial_prd` = `scp`.`serial_prd`) and (`prd`.`status_prd` = _latin1'ACTIVE')))) join `student` `std` on((`std`.`serial_std` = `stc`.`serial_std`))) join `student_criteria_grade` `scg` on(((`scg`.`serial_prd` = `scp`.`serial_prd`) and (`scg`.`serial_sbc` = `sbc`.`serial_sbc`) and (`scg`.`serial_std` = `std`.`serial_std`) and (`scg`.`status_scg` = _latin1'ACTIVE') and (`scg`.`is_complete_scg` = _latin1'YES')))) join `activity` `act` on((`act`.`serial_act` = `scg`.`serial_act`))) where (not((`scy`.`status_scy` like _latin1'%INACTIVE%'))) group by `scg`.`serial_std`,`scg`.`serial_act`,`scg`.`serial_crs`,`scg`.`serial_sbc` order by `scy`.`serial_scy`,`crs`.`serial_crs`,`stc`.`serial_std`,concat(if(isnull(`csb2`.`name_csb`),_latin1'',concat(`csb2`.`name_csb`,_latin1'-')),`csb`.`name_csb`),`prd`.`serial_prd`,`scg`.`serial_act`,`scg`.`serial_att` */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;

--
-- Final view structure for view `view_opt_activity_grades`
--

/*!50001 DROP VIEW IF EXISTS `view_opt_activity_grades`*/;
/*!50001 SET @saved_cs_client          = @@character_set_client */;
/*!50001 SET @saved_cs_results         = @@character_set_results */;
/*!50001 SET @saved_col_connection     = @@collation_connection */;
/*!50001 SET character_set_client      = latin1 */;
/*!50001 SET character_set_results     = latin1 */;
/*!50001 SET collation_connection      = latin1_swedish_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `view_opt_activity_grades` AS select `scy`.`serial_scy` AS `serial_scy`,`scy`.`name_scy` AS `name_scy`,`osg`.`serial_opa` AS `serial_opa`,`opa`.`due_date_opa` AS `due_date_opa`,`osg`.`serial_osb` AS `serial_osb`,concat(if(isnull(`csb2`.`name_csb`),_latin1'',concat(`csb2`.`name_csb`,_latin1'-')),`csb`.`name_csb`) AS `subject_name`,`osg`.`serial_att` AS `serial_att`,`osg`.`serial_prd` AS `serial_prd`,`prd`.`name_prd` AS `name_prd`,`osg`.`serial_std` AS `serial_std`,`std`.`first_name_std` AS `first_name_std`,`std`.`last_name_std` AS `last_name_std`,sum(`osg`.`activity_grade_part_osg`) AS `act_grade` from (((((((((`opt_student_criteria_grade` `osg` join `opt_activity` `opa` on(((`osg`.`serial_opa` = `opa`.`serial_opa`) and (`opa`.`status_opa` = _latin1'ACTIVE')))) join `student_optional_subject` `sos` on(((`sos`.`serial_osb` = `osg`.`serial_osb`) and (`sos`.`serial_std` = `osg`.`serial_std`) and (`sos`.`serial_prd` = `osg`.`serial_prd`) and (`sos`.`status_sos` = _latin1'ACTIVE')))) join `student` `std` on(((`std`.`serial_std` = `sos`.`serial_std`) and (`std`.`status_std` = _latin1'ACTIVE')))) join `optional_subject` `osb` on(((`osb`.`serial_osb` = `osg`.`serial_osb`) and (`osb`.`status_osb` = _latin1'ACTIVE')))) join `cat_subject` `csb` on(((`csb`.`serial_csb` = `osb`.`serial_csb`) and (`csb`.`status_csb` = _latin1'ACTIVE')))) left join `cat_subject` `csb2` on((`csb`.`cat_serial_csb` = `csb2`.`serial_csb`))) join `period_group_year` `pgy` on(((`pgy`.`serial_pgy` = `osb`.`serial_pgy`) and (`pgy`.`status_pgy` = _latin1'ACTIVE')))) join `school_year` `scy` on(((`scy`.`serial_scy` = `pgy`.`serial_scy`) and (not((`scy`.`status_scy` like _latin1'%INACTIVE%')))))) join `period` `prd` on(((`prd`.`serial_prd` = `osg`.`serial_prd`) and (`prd`.`status_prd` = _latin1'ACTIVE')))) where ((`osg`.`status_osg` = _latin1'ACTIVE') and (`osg`.`is_complete_osg` = _latin1'YES')) group by `osg`.`serial_opa`,`osg`.`serial_osb`,`osg`.`serial_att`,`osg`.`serial_prd`,`osg`.`serial_std` order by `scy`.`serial_scy`,`osg`.`serial_std`,concat(if(isnull(`csb2`.`name_csb`),_latin1'',concat(`csb2`.`name_csb`,_latin1'-')),`csb`.`name_csb`),`osg`.`serial_prd`,`osg`.`serial_opa`,`osg`.`serial_att` */;
/*!50001 SET character_set_client      = @saved_cs_client */;
/*!50001 SET character_set_results     = @saved_cs_results */;
/*!50001 SET collation_connection      = @saved_col_connection */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2015-04-22 10:48:54
