-- MySQL dump 10.13  Distrib 5.6.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1    Database: test
-- ------------------------------------------------------
-- 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 `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) DEFAULT '1',
  `type_admission` varchar(70) DEFAULT NULL,
  `status_admission` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_admission`)
) ENGINE=InnoDB AUTO_INCREMENT=348 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 */;

--
-- 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,
  `path_file` varchar(100) DEFAULT NULL,
  `filename_dc` varchar(500) DEFAULT NULL,
  `type_file` varchar(45) DEFAULT NULL,
  `status_dc` enum('PENDING','SUBMITTED') NOT NULL DEFAULT 'PENDING',
  `order_lsy` int(11) DEFAULT NULL,
  `update_document` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  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 AUTO_INCREMENT=121 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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,
  `first_surname_asfml` varchar(255) DEFAULT NULL,
  `last_surname_asfml` varchar(255) DEFAULT NULL,
  `phone_asfml` varchar(255) DEFAULT NULL,
  `status_asfml` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  `main_street` varchar(100) DEFAULT NULL,
  `secundary_street` varchar(100) DEFAULT NULL,
  `number_street` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`serial_asfml`)
) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `aspirant_family_guardian`
--

DROP TABLE IF EXISTS `aspirant_family_guardian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspirant_family_guardian` (
  `serial_asgu_fml` int(11) NOT NULL AUTO_INCREMENT,
  `serial_asgu` int(11) NOT NULL,
  `serial_asfml` int(11) NOT NULL,
  `status_asfmg` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_asgu_fml`),
  KEY `fk_relationship_345` (`serial_asfml`),
  KEY `fk_relationship_346` (`serial_asgu`),
  CONSTRAINT `serial_asp_fml` FOREIGN KEY (`serial_asfml`) REFERENCES `aspirant_family` (`serial_asfml`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `serial_asp_guar` FOREIGN KEY (`serial_asgu`) REFERENCES `aspirant_guardian` (`serial_asgu`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=190 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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_emp` int(11) DEFAULT NULL,
  `serial_nnt` int(11) DEFAULT NULL,
  `serial_nnt_2` 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) DEFAULT NULL,
  `first_name_asgu` varchar(512) DEFAULT NULL,
  `last_name_asgu` varchar(512) DEFAULT NULL,
  `birthdate_asgu` date DEFAULT NULL,
  `gender_asgu` enum('MALE','FEMALE') DEFAULT NULL,
  `marital_status_asgu` enum('SINGLE','MARRIED','DIVORCED','WIDOWED','UNMARRIED PARTNERS') DEFAULT 'MARRIED',
  `alumnus_asgu` enum('YES','NO') DEFAULT 'NO',
  `phone_asgu` varchar(30) DEFAULT NULL,
  `mobile_asgu` varchar(30) DEFAULT NULL,
  `company_phone_asgu` varchar(45) 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` varchar(20) DEFAULT NULL,
  `company_addres_asgu` varchar(45) 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') 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_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_serian_nnt_2_idx` (`serial_nnt_2`),
  CONSTRAINT `fk_serial_nnt` FOREIGN KEY (`serial_nnt`) REFERENCES `nationality` (`serial_nnt`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_serian_nnt_2` FOREIGN KEY (`serial_nnt_2`) 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 AUTO_INCREMENT=462 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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) DEFAULT NULL COMMENT 'clave foranea perteneciante a la tabla provincia',
  `serial_cnt` int(11) DEFAULT NULL COMMENT 'clave foranea perteneciente a la tabla canton',
  `serial_par` int(11) DEFAULT 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,
  `reference` varchar(100) 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 AUTO_INCREMENT=79 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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(500) DEFAULT NULL,
  `serial_usr1` int(11) DEFAULT NULL,
  `comment2` varchar(1000) DEFAULT NULL,
  `serial_user2` int(11) DEFAULT NULL,
  PRIMARY KEY (`serial_asre`),
  KEY `fk_serial_asstu3_idx` (`serial_asstu`),
  KEY `fk_serial_type_idx` (`serial_tyrp`),
  CONSTRAINT `fk_serial_asstu3` FOREIGN KEY (`serial_asstu`) REFERENCES `aspirant_student` (`serial_asstu`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_serial_type` FOREIGN KEY (`serial_tyrp`) REFERENCES `type_report` (`serial_tyrp`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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,
  `level_sibling` varchar(45) 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 AUTO_INCREMENT=216 DEFAULT CHARSET=latin1 COMMENT='Hermanos del aspirante';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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 AUTO_INCREMENT,
  `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,
  `request` int(11) DEFAULT NULL,
  `serial_school` int(11) DEFAULT NULL,
  `id_asstu` varchar(10) DEFAULT NULL,
  `first_name_asstu` varchar(512) NOT NULL,
  `last_name_asstu` varchar(512) NOT NULL,
  `known_name` varchar(50) DEFAULT 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','FATHER','MOTHER','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') NOT NULL,
  `photo_asstu` varchar(1024) DEFAULT NULL,
  `email_asstu` varchar(256) DEFAULT NULL,
  `legal_guardian` enum('FATHER','MOTHER','OTHER') 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) NOT 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` date DEFAULT NULL,
  `modification_date_asstu` date DEFAULT NULL,
  `Parents_live_asstu` enum('TOGETHER','SEPARATED') NOT NULL DEFAULT 'TOGETHER',
  `Repeat_level` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `reason_for_repeat` tinytext,
  `Application_status` enum('WAITING LIST','DENIED','PROGRESS','SLOPE','SLOPE DOCUMENTS','READY TO COMMISSION','APPROVED','APPLY NEXT YEAR','COLLECTORSHIP','ACADEMIC SECRETARY') DEFAULT NULL,
  `publicity_telling` varchar(100) DEFAULT NULL,
  `link_school` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`serial_asstu`,`rep_phone_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 `serial_admission_idx` (`serial_admission`),
  KEY `fk_serial_as_fml_idx` (`serial_asfml`),
  KEY `fk_serial_school_idx` (`serial_school`),
  CONSTRAINT `fk_serial_as_fml` FOREIGN KEY (`serial_asfml`) REFERENCES `aspirant_family` (`serial_asfml`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_serial_school` FOREIGN KEY (`serial_school`) REFERENCES `school` (`serial_sch`) 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 AUTO_INCREMENT=287 DEFAULT CHARSET=latin1 COMMENT='web_pre_registration';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `aspirant_student_guardian`
--

DROP TABLE IF EXISTS `aspirant_student_guardian`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aspirant_student_guardian` (
  `serial_asstu` int(11) NOT NULL DEFAULT '0',
  `serial_asgu` int(11) NOT NULL DEFAULT '0',
  `relationship_asstu` enum('MOTHER','FATHER','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') DEFAULT NULL,
  `legal_guardian_asstu` enum('YES','NO') DEFAULT 'NO',
  `economic_guardian_asstu` enum('YES','NO') DEFAULT NULL,
  `status_asstu` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_asstu`,`serial_asgu`),
  KEY `fk_is_guardian` (`serial_asgu`),
  CONSTRAINT `fk_serial_as_guardian` FOREIGN KEY (`serial_asgu`) REFERENCES `aspirant_guardian` (`serial_asgu`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_serial_aspirant_student` 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 */;

--
-- Table structure for table `birthdate_for_section_level`
--

DROP TABLE IF EXISTS `birthdate_for_section_level`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `birthdate_for_section_level` (
  `serial_bsl` int(11) NOT NULL AUTO_INCREMENT,
  `serial_scy` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `serial_lvl` int(11) DEFAULT NULL,
  `birthdate` date DEFAULT NULL,
  `status` enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_bsl`),
  KEY `fk_birth_serial_set_idx` (`serial_set`),
  KEY `fk_birth_serial_lvl_idx` (`serial_lvl`),
  KEY `fk_birth_serial_scy_idx` (`serial_scy`),
  CONSTRAINT `fk_birth_serial_lvl` FOREIGN KEY (`serial_lvl`) REFERENCES `level` (`serial_lvl`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_birth_serial_scy` FOREIGN KEY (`serial_scy`) REFERENCES `school_year` (`serial_scy`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_birth_serial_set` FOREIGN KEY (`serial_set`) REFERENCES `section` (`serial_set`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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` varchar(200) 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 AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `employee_section`
--

DROP TABLE IF EXISTS `employee_section`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `employee_section` (
  `serial_emp_set` int(11) NOT NULL AUTO_INCREMENT,
  `serial_emp` int(11) DEFAULT NULL,
  `serial_set` int(11) DEFAULT NULL,
  `type_user` enum('DIRECTOR','ASSISTANT','USER') DEFAULT 'USER',
  `status` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_emp_set`),
  KEY `fk_serial_set_idx` (`serial_set`),
  KEY `fk_serial_employee` (`serial_emp`),
  CONSTRAINT `fk_serial_employee` FOREIGN KEY (`serial_emp`) REFERENCES `employee` (`serial_emp`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_serial_set` FOREIGN KEY (`serial_set`) REFERENCES `section` (`serial_set`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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) DEFAULT 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 AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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 AUTO_INCREMENT=399 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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` varchar(1024) NOT NULL,
  `remember_token` 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 AUTO_INCREMENT=212 DEFAULT CHARSET=latin1 COMMENT='web_user';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- 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,
  `serial_parish` int(11) DEFAULT NULL,
  `name_zne` varchar(64) NOT NULL,
  `status_zne` enum('ACTIVE','INACTIVE') NOT NULL DEFAULT 'INACTIVE',
  PRIMARY KEY (`serial_zne`),
  KEY `fk_parish_neigthboard_idx` (`serial_parish`),
  CONSTRAINT `fk_parish_neigthboard` FOREIGN KEY (`serial_parish`) REFERENCES `parish` (`serial_par`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1078 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'test'
--

--
-- Dumping routines for database 'test'
--


