
-- -----------------------------------------------------
-- Table `scale_list`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_list` (
  `serial_sct` INT NOT NULL AUTO_INCREMENT,
  `name_sct` TEXT NULL,
  `name_2_lst` TEXT NULL,
  `alias_sct` TEXT NULL,
  `status_sct` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_sct`))
ENGINE = InnoDB;

-- -----------------------------------------------------
-- Table `employe_scale_shool_year`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employe_scale_shool_year` (
  `serial_esc` INT NOT NULL AUTO_INCREMENT,
  `serial_sct` INT NULL,
  `serial_scy` INT(11) NULL,
  `serial_emp` INT(11) NULL,
  `points_esc` DECIMAL(5,2) NULL,
  `status_esc` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_esc`),
  INDEX `fk_scale_list_has_school_year_school_year1_idx` (`serial_scy` ASC),
  INDEX `fk_scale_list_has_school_year_scale_list_idx` (`serial_sct` ASC),
  INDEX `fk_scale_list_has_school_year_employee1_idx` (`serial_emp` ASC),
  CONSTRAINT `fk_scale_list_has_school_year_scale_list`
    FOREIGN KEY (`serial_sct`)
    REFERENCES `scale_list` (`serial_sct`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_scale_list_has_school_year_school_year1`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_scale_list_has_school_year_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `training_course`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `training_course` (
  `serial_trc` INT NOT NULL AUTO_INCREMENT,
  `name_trc` TEXT NULL,
  `status_trc` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_trc`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `institution_training`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `institution_training` (
  `serial_ist` INT NOT NULL AUTO_INCREMENT,
  `name_ist` TEXT NULL,
  `status_ist` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_ist`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `publication`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `publication` (
  `serial_pbt` INT NOT NULL AUTO_INCREMENT,
  `name_pbt` TEXT NULL,
  `status_pbt` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_pbt`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `acknowledgement`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `acknowledgement` (
  `serial_ack` INT NOT NULL AUTO_INCREMENT,
  `name_ack` TEXT NULL,
  `status_ack` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_ack`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `scale_acknowledgement`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_acknowledgement` (
  `serial_sak` INT(11) NOT NULL AUTO_INCREMENT,
  `name_sak` TEXT NULL,
  `points_sak` DECIMAL(5,2) NULL DEFAULT NULL,
  `status_sak` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_sak`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `employee_acknowledgement`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_acknowledgement` (
  `serial_eck` INT NOT NULL AUTO_INCREMENT,
  `serial_ack` INT NULL,
  `serial_emp` INT(11) NULL,
  `serial_sak` INT(11) NULL,
  `date_eck` DATE NULL,
  `status_eak` ENUM('ACTIVE', 'INACTIVE') NULL,
  INDEX `fk_acknowledgement_has_employee_employee1_idx` (`serial_emp` ASC),
  INDEX `fk_acknowledgement_has_employee_acknowledgement1_idx` (`serial_ack` ASC),
  INDEX `fk_acknowledgement_has_employee_scale_acknowledgement1_idx` (`serial_sak` ASC),
  PRIMARY KEY (`serial_eck`),
  CONSTRAINT `fk_acknowledgement_has_employee_acknowledgement1`
    FOREIGN KEY (`serial_ack`)
    REFERENCES `acknowledgement` (`serial_ack`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_acknowledgement_has_employee_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_acknowledgement_has_employee_scale_acknowledgement1`
    FOREIGN KEY (`serial_sak`)
    REFERENCES `scale_acknowledgement` (`serial_sak`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `employee_experience`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_experience` (
  `serial_eep` INT NOT NULL AUTO_INCREMENT,
  `serial_emp` INT(11) NULL,
  `date_start_eep` DATE NULL,
  `date_end_eep` DATE NULL,
  `status_eep` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_eep`),
  INDEX `fk_employee_experience_employee1_idx` (`serial_emp` ASC),
  CONSTRAINT `fk_employee_experience_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `scale_codification`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_codification` (
  `serial_scd` INT(11) NOT NULL AUTO_INCREMENT,
  `name_scd` VARCHAR(100) NULL COMMENT 'Nombre Codificación ',
  `abbreviation_scd` VARCHAR(45) NULL DEFAULT NULL,
  `status_scd` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_scd`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_period_class`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_period_class` (
  `serial_scp` INT(11) NOT NULL AUTO_INCREMENT,
  `clases_periods_scp` INT(11) NULL,
  `status_scp` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_scp`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_codification_period_class`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_codification_period_class` (
  `serial_scc` INT(11) NOT NULL AUTO_INCREMENT,
  `serial_scd` INT(11) NULL DEFAULT NULL,
  `serial_scp` INT(11) NULL DEFAULT NULL,
  `points_scc` DECIMAL(5,2) NULL,
  `status_scc` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_scc`),
  INDEX `fk_scale_codification_cdf_has_scale_clases_periods_scale_cl_idx` (`serial_scp` ASC),
  INDEX `fk_scale_codification_cdf_has_scale_clases_periods_scale_co_idx` (`serial_scd` ASC),
  CONSTRAINT `fk_scale_codification_cdf_has_scale_clases_periods_scale_clas1`
    FOREIGN KEY (`serial_scp`)
    REFERENCES `scale_period_class` (`serial_scp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_scale_codification_cdf_has_scale_clases_periods_scale_codi`
    FOREIGN KEY (`serial_scd`)
    REFERENCES `scale_codification` (`serial_scd`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_degree`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_degree` (
  `serial_sdg` INT(11) NOT NULL AUTO_INCREMENT,
  `code_sdg` VARCHAR(45) NULL,
  `name_sdg` VARCHAR(45) NULL DEFAULT NULL,
  `description_sdg` VARCHAR(255) NULL DEFAULT NULL,
  `alias_sdg` VARCHAR(45) NULL DEFAULT NULL,
  `points_sdg` DECIMAL(5,2) NULL DEFAULT NULL,
  `status_sdg` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_sdg`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_experience`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_experience` (
  `serial_sce` INT(11) NOT NULL AUTO_INCREMENT,
  `type_sce` ENUM('OUTCAE', 'INCAE') NULL,
  `number_years_sce` INT NULL DEFAULT NULL,
  `points_sce` DECIMAL(5,2) NULL DEFAULT NULL,
  `status_sce` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_sce`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_language`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_language` (
  `serial_slg` INT(11) NOT NULL AUTO_INCREMENT,
  `name_slg` VARCHAR(45) NULL,
  `points_slg` DECIMAL(5,2) NULL DEFAULT NULL,
  `status_slg` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_slg`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_publication`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_publication` (
  `serial_spb` INT(11) NOT NULL AUTO_INCREMENT,
  `type_spb` TEXT NULL,
  `max_points_spb` DECIMAL(5,2) NULL DEFAULT NULL,
  `points_spb` DECIMAL(5,2) NULL DEFAULT NULL,
  `status_spb` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_spb`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_responsibilities_institution`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_responsibilities_institution` (
  `serial_srp` INT(11) NOT NULL AUTO_INCREMENT,
  `name_srp` TEXT NULL,
  `description_srp` TEXT NULL DEFAULT NULL,
  `points_srp` DECIMAL(5,2) NULL DEFAULT NULL,
  `status_srp` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_srp`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_time_dedication`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_time_dedication` (
  `serial_std` INT(11) NOT NULL AUTO_INCREMENT,
  `name_std` VARCHAR(45) NULL,
  `description_std` VARCHAR(500) NULL DEFAULT NULL,
  `percentage_std` INT(11) NULL DEFAULT NULL,
  `status_std` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_std`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_training_type`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_training_type` (
  `serial_stt` INT(11) NOT NULL AUTO_INCREMENT,
  `name_stt` VARCHAR(250) NULL,
  `max_points_stt` DECIMAL(5,2) NULL DEFAULT NULL,
  `status_stt` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_stt`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `scale_training`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `scale_training` (
  `serial_str` INT(11) NOT NULL AUTO_INCREMENT,
  `serial_stt` INT(11) NOT NULL,
  `lenght_str` DECIMAL(5,2) NULL,
  `points_str` DECIMAL(5,2) NULL DEFAULT NULL,
  `status_str` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL,
  PRIMARY KEY (`serial_str`, `serial_stt`),
  INDEX `fk_scale_training_scale_training_type1_idx` (`serial_stt` ASC),
  CONSTRAINT `fk_scale_training_scale_training_type1`
    FOREIGN KEY (`serial_stt`)
    REFERENCES `scale_training_type` (`serial_stt`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;




-- -----------------------------------------------------
-- Table `employee_scale_total_school_year`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_scale_total_school_year` (
  `serial_est` INT(11) NOT NULL,
  `serial_emp` INT(11) NULL,
  `serial_scy` INT(11) NULL,
  `score_fixe_est` DECIMAL(5,2) NULL,
  `score_movil_est` DECIMAL(5,2) NULL,
  `score_total_est` DECIMAL(5,2) NULL,
  `score_total_ajusted_est` DECIMAL(5,2) NULL,
  `status_est` ENUM('ACTIVE', 'INACTIVE') NULL,
  INDEX `fk_employee_has_school_year_school_year1_idx` (`serial_scy` ASC),
  INDEX `fk_employee_has_school_year_employee1_idx` (`serial_emp` ASC),
  PRIMARY KEY (`serial_est`),
  CONSTRAINT `fk_employee_has_school_year_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_school_year_school_year1`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `employee_training`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_training` (
  `serial_etr` INT NOT NULL AUTO_INCREMENT,
  `serial_emp` INT(11) NULL,
  `serial_trn` INT NULL,
  `serial_ist` INT NULL,
  `serial_stt` INT(11) NULL,
  `date_etr` DATE NULL,
  `hours_etr` DECIMAL(6,2) NULL,
  `status_etr` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_etr`),
  INDEX `fk_employee_has_training_training1_idx` (`serial_trn` ASC),
  INDEX `fk_employee_has_training_employee1_idx` (`serial_emp` ASC),
  INDEX `fk_employee_has_training_training_institution1_idx` (`serial_ist` ASC),
  INDEX `fk_employee_has_training_scale_training_type1_idx` (`serial_stt` ASC),
  CONSTRAINT `fk_employee_has_training_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_training_training1`
    FOREIGN KEY (`serial_trn`)
    REFERENCES `training_course` (`serial_trc`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_training_training_institution1`
    FOREIGN KEY (`serial_ist`)
    REFERENCES `institution_training` (`serial_ist`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_training_scale_training_type1`
    FOREIGN KEY (`serial_stt`)
    REFERENCES `scale_training_type` (`serial_stt`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `employee_publication`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_publication` (
  `serial_epb` INT NOT NULL AUTO_INCREMENT,
  `serial_spb` INT(11) NULL,
  `serial_emp` INT(11) NULL,
  `serial_pbt` INT NULL,
  `date_epb` DATE NULL,
  `status_epb` ENUM('ACTIVE', 'INACTIVE') NULL,
  INDEX `fk_employee_has_publication_publication1_idx` (`serial_pbt` ASC),
  INDEX `fk_employee_has_publication_employee1_idx` (`serial_emp` ASC),
  INDEX `fk_employee_has_publication_scale_publication1_idx` (`serial_spb` ASC),
  PRIMARY KEY (`serial_epb`),
  CONSTRAINT `fk_employee_has_publication_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_publication_publication1`
    FOREIGN KEY (`serial_pbt`)
    REFERENCES `publication` (`serial_pbt`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_publication_scale_publication1`
    FOREIGN KEY (`serial_spb`)
    REFERENCES `scale_publication` (`serial_spb`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `employee_scale_language`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_scale_language` (
  `serial_elg` INT NOT NULL AUTO_INCREMENT,
  `serial_emp` INT(11) NULL,
  `serial_slg` INT(11) NULL,
  `serial_scy` INT(11) NULL,
  `status_elg` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_elg`),
  INDEX `fk_employee_has_scale_language_scale_language1_idx` (`serial_slg` ASC),
  INDEX `fk_employee_has_scale_language_employee1_idx` (`serial_emp` ASC),
  INDEX `fk_employee_has_scale_language_school_year1_idx` (`serial_scy` ASC),
  CONSTRAINT `fk_employee_has_scale_language_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_scale_language_scale_language1`
    FOREIGN KEY (`serial_slg`)
    REFERENCES `scale_language` (`serial_slg`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_scale_language_school_year1`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `employee_responsibilities_institution`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_responsibilities_institution` (
  `serial_eri` INT NOT NULL AUTO_INCREMENT,
  `serial_emp` INT(11) NULL,
  `serial_srp` INT(11) NULL,
  `serial_scy` INT(11) NOT NULL,
  `status_eri` ENUM('ACTIVE', 'INACTIVE') NULL,
  INDEX `fk_employee_has_scale_responsibilities_institution_scale_re_idx` (`serial_srp` ASC),
  INDEX `fk_employee_has_scale_responsibilities_institution_employee_idx` (`serial_emp` ASC),
  PRIMARY KEY (`serial_eri`),
  INDEX `fk_employee_responsibilities_institution_school_year1_idx` (`serial_scy` ASC),
  CONSTRAINT `fk_employee_has_scale_responsibilities_institution_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_scale_responsibilities_institution_scale_resp1`
    FOREIGN KEY (`serial_srp`)
    REFERENCES `scale_responsibilities_institution` (`serial_srp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_responsibilities_institution_school_year1`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `employee_scale_codification_period_class`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_scale_codification_period_class` (
  `serial_esc` INT NOT NULL AUTO_INCREMENT,
  `serial_emp` INT(11) NULL,
  `serial_scc` INT(11) NULL,
  `status_esc` ENUM('ACTIVE', 'INACTIVE') NULL,
  `serial_scy` INT(11) NOT NULL,
  PRIMARY KEY (`serial_esc`),
  INDEX `fk_employee_has_scale_codification_period_class_scale_codif_idx` (`serial_scc` ASC),
  INDEX `fk_employee_has_scale_codification_period_class_employee1_idx` (`serial_emp` ASC),
  INDEX `fk_employee_scale_codification_period_class_school_year1_idx` (`serial_scy` ASC),
  CONSTRAINT `fk_employee_has_scale_codification_period_class_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_scale_codification_period_class_scale_codific1`
    FOREIGN KEY (`serial_scc`)
    REFERENCES `scale_codification_period_class` (`serial_scc`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_scale_codification_period_class_school_year1`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `employee_scale_degree`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_scale_degree` (
  `serial_esc` INT NOT NULL AUTO_INCREMENT,
  `serial_emp` INT(11) NULL,
  `serial_sdg` INT(11) NULL,
  `status_esc` ENUM('ACTIVE', 'INACTIVE') NULL,
  `serial_scy` INT(11) NOT NULL,
  INDEX `fk_employee_has_scale_degree_scale_degree1_idx` (`serial_sdg` ASC),
  INDEX `fk_employee_has_scale_degree_employee1_idx` (`serial_emp` ASC),
  PRIMARY KEY (`serial_esc`),
  INDEX `fk_employee_scale_degree_school_year1_idx` (`serial_scy` ASC),
  CONSTRAINT `fk_employee_has_scale_degree_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_scale_degree_scale_degree1`
    FOREIGN KEY (`serial_sdg`)
    REFERENCES `scale_degree` (`serial_sdg`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_scale_degree_school_year1`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;


-- -----------------------------------------------------
-- Table `employee_time_dedication
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `employee_time_dedication` (
  `serial_etd` INT NOT NULL AUTO_INCREMENT,
  `serial_scy` INT(11) NULL,
  `serial_emp` INT(11) NULL,
  `serial_std` INT(11) NULL,
  `status_etd` ENUM('ACTIVE', 'INACTIVE') NULL,
  INDEX `fk_employee_has_scale_time_dedication_scale_time_dedication_idx` (`serial_std` ASC),
  INDEX `fk_employee_has_scale_time_dedication_employee1_idx` (`serial_emp` ASC),
  INDEX `fk_employee_has_scale_time_dedication_school_year1_idx` (`serial_scy` ASC),
  PRIMARY KEY (`serial_etd`),
  CONSTRAINT `fk_employee_has_scale_time_dedication_employee1`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_scale_time_dedication_scale_time_dedication1`
    FOREIGN KEY (`serial_std`)
    REFERENCES `scale_time_dedication` (`serial_std`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_employee_has_scale_time_dedication_school_year1`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1;

INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('638', '1', 'Escalafón', 'laravel/public/scale', '1', 'LOCKABLE');
insert into allowed_pages_by_process values(638,'scalecontroller@getindex');
insert into allowed_pages_by_process values(638,'scaleacademicchargecontroller@getscale');
insert into allowed_pages_by_process values(638,'scaleacademicchargecontroller@postsave');
insert into allowed_pages_by_process values(638,'scalecodificationcontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scalecodificationcontroller@postsave');
insert into allowed_pages_by_process values(638,'scaledegreecontroller@getscaledegere');
insert into allowed_pages_by_process values(638,'scaledegreecontroller@postSaveEducationPoints');
insert into allowed_pages_by_process values(638,'scaledegreecontroller@getscaledegreeinfo');
insert into allowed_pages_by_process values(638,'scaledegreecontroller@getscaledegreeinfodelete');
insert into allowed_pages_by_process values(638,'scaledegreecontroller@postscaledegreeinfo');
insert into allowed_pages_by_process values(638,'scaledegreecontroller@postsave');
insert into allowed_pages_by_process values(638,'scaleexperiencecontroller@getscale');
insert into allowed_pages_by_process values(638,'scaleexperiencecontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scaleexperiencecontroller@getscaleinfodelete');
insert into allowed_pages_by_process values(638,'scaleexperiencecontroller@postsave');
insert into allowed_pages_by_process values(638,'scaleexperiencecontroller@postsavedateexperiencesst');
insert into allowed_pages_by_process values(638,'scalelanguagecontroller@getscale');
insert into allowed_pages_by_process values(638,'scalelanguagecontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scalelanguagecontroller@getScaleinfodelete');
insert into allowed_pages_by_process values(638,'scalelanguagecontroller@postsave');
insert into allowed_pages_by_process values(638,'scalelanguagecontroller@postsavespeciallanguagepointssst');
insert into allowed_pages_by_process values(638,'scaleperiodclasscontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scaleperiodclasscontroller@postsave');
insert into allowed_pages_by_process values(638,'scalepublicationcontroller@getscale');
insert into allowed_pages_by_process values(638,'scalepublicationcontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scalepublicationcontroller@getscaleinfodelete');
insert into allowed_pages_by_process values(638,'scalepublicationcontroller@postsave');
insert into allowed_pages_by_process values(638,'scalepublicationcontroller@postsavemaxpontssst');
insert into allowed_pages_by_process values(638,'scaleresponsabilitiesinstitutioncontroller@getscale');
insert into allowed_pages_by_process values(638,'scaleresponsabilitiesinstitutioncontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scaleresponsabilitiesinstitutioncontroller@getscaleinfodelete');
insert into allowed_pages_by_process values(638,'scaleresponsabilitiesinstitutioncontroller@postsave');
insert into allowed_pages_by_process values(638,'scaletimededicationcontroller@getscale');
insert into allowed_pages_by_process values(638,'scaletimededicationcontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scaletimededicationcontroller@getscaleinfodelete');
insert into allowed_pages_by_process values(638,'scaletimededicationcontroller@postsave');
insert into allowed_pages_by_process values(638,'scaletimededicationcontroller@postsavedivisionfactortimededicationsst');
insert into allowed_pages_by_process values(638,'scaletrainingcontroller@getscale');
insert into allowed_pages_by_process values(638,'scaletrainingcontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scaletrainingcontroller@getscaleinfodelete');
insert into allowed_pages_by_process values(638,'scaletrainingcontroller@postsave');
insert into allowed_pages_by_process values(638,'scaletrainingtypecontroller@getscale');
insert into allowed_pages_by_process values(638,'scaletrainingtypecontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scaletrainingtypecontroller@getscaleinfodelete');
insert into allowed_pages_by_process values(638,'scaletrainingtypecontroller@trainigtypeinfo');
insert into allowed_pages_by_process values(638,'scaletrainingtypecontroller@postsave');
insert into allowed_pages_by_process values(638,'scaletrainingtypecontroller@postsavenumberyearsshorttermbacksst');
insert into allowed_pages_by_process values(638,'scaleacknowledgementcontroller@getscale');
insert into allowed_pages_by_process values(638,'scaleacknowledgementcontroller@getscaleinfo');
insert into allowed_pages_by_process values(638,'scaleacknowledgementcontroller@getscaleinfodelete');
insert into allowed_pages_by_process values(638,'scaleacknowledgementcontroller@postsave');
insert into allowed_pages_by_process values(638,'scaleacknowledgementcontroller@postsavemaxpontssst');
insert into allowed_pages_by_process values(638,'scaleacknowledgementcontroller@getscale');
insert into allowed_pages_by_process values(638,'valuepointcontroller@getscale');
insert into allowed_pages_by_process values(638,'valuepointcontroller@getinfo');
insert into allowed_pages_by_process values(638,'valuepointcontroller@postsave');
insert into allowed_pages_by_process values(638,'scaleschedulecontroller@getscale');
insert into allowed_pages_by_process values(638,'scaleschedulecontroller@getinfo');
insert into allowed_pages_by_process values(638,'scaleschedulecontroller@postsave');
insert into allowed_pages_by_process values(638,'scalelistcontroller@getscale');
insert into allowed_pages_by_process values(638,'scalelistcontroller@getinfo');
insert into allowed_pages_by_process values(638,'scalelistcontroller@postsave');

ALTER TABLE `employe_scale_shool_year` 
ADD COLUMN `type_points` ENUM('POINTS', 'YEARS') NULL DEFAULT 'POINTS' AFTER `status_esc`;

ALTER TABLE `school_year` 
CHANGE COLUMN `activities_scy` `activities_scy` SET('NOTAPPLY', 'INSCRIPTION', 'EXTRACURRICULAR', 'CRON', 'ENABLE_SCALE') NULL DEFAULT 'NOTAPPLY' COMMENT 'status par inscripciones' ;

ALTER TABLE `employee_publication` 
CHANGE COLUMN `status_epb` `status_epb` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT NULL ;

ALTER TABLE `employe_scale_shool_year` 
ADD COLUMN `obserbations_esc` TEXT NULL AFTER `points_esc`;

ALTER TABLE `employee_training` 
DROP FOREIGN KEY `fk_employee_has_training_training1`;
ALTER TABLE `employee_training` 
CHANGE COLUMN `serial_trn` `serial_trc` INT(11) NULL DEFAULT NULL ;
ALTER TABLE `employee_training` 
ADD CONSTRAINT `fk_employee_has_training_training1`
  FOREIGN KEY (`serial_trc`)
  REFERENCES `training_course` (`serial_trc`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

INSERT INTO `scale_training_type` (`serial_stt`,`name_stt`,`max_points_stt`,`status_stt`) VALUES (1,'Largo plazo',6.00,'ACTIVE');
INSERT INTO `scale_training_type` (`serial_stt`,`name_stt`,`max_points_stt`,`status_stt`) VALUES (2,'Corto plazo',4.00,'ACTIVE');


ALTER TABLE `scale_training_type` 
ADD COLUMN `min_hours_number_stt` DECIMAL(5,2) NULL AFTER `max_points_stt`,
ADD COLUMN `courses_number_sst` DECIMAL(5,2) NULL AFTER `min_hours_number_stt`;

ALTER TABLE `institution_training` 
CHANGE COLUMN `serial_ist` `serial_ist` INT(11) NOT NULL AUTO_INCREMENT ;

ALTER TABLE `scale_responsibilities_institution` 
ADD COLUMN `quantities_srp` ENUM('YES', 'NO') NULL DEFAULT NULL AFTER `points_srp`;

ALTER TABLE `employee_responsibilities_institution` 
ADD COLUMN `quantity_eri` DECIMAL(5,2) NULL AFTER `status_eri`;

CREATE TABLE `employee_degree` (
  `serial_edg` INT NOT NULL AUTO_INCREMENT,
  `serial_emp` INT NULL,
  `serial_dgr` INT NULL,
  `serial_sdg` INT NULL,
  `status_edg` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_edg`));
ALTER TABLE `employee_degree` 
ADD INDEX `fky_edg_emp_idx` (`serial_emp` ASC),
ADD INDEX `fky_edg_dgr_idx` (`serial_dgr` ASC),
ADD INDEX `fky_edg_sdg_idx` (`serial_sdg` ASC);
ALTER TABLE `employee_degree` 
ADD CONSTRAINT `fky_edg_emp`
  FOREIGN KEY (`serial_emp`)
  REFERENCES `employee` (`serial_emp`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fky_edg_dgr`
  FOREIGN KEY (`serial_dgr`)
  REFERENCES `degree` (`serial_dgr`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fky_edg_sdg`
  FOREIGN KEY (`serial_sdg`)
  REFERENCES `scale_degree` (`serial_sdg`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

ALTER TABLE `employee_degree` 
ADD COLUMN `date_edg` DATE NULL AFTER `serial_sdg`;

ALTER TABLE `scale_degree` 
ADD COLUMN `bachelor_sdg` ENUM('YES', 'NO') NULL DEFAULT 'NO' AFTER `points_sdg`;


ALTER TABLE `employee_degree` 
ADD COLUMN `serial_sch` INT NULL AFTER `serial_sdg`,
ADD COLUMN `serial_unv` INT NULL AFTER `serial_sch`,
ADD INDEX `fky_edg_sch_idx` (`serial_sch` ASC),
ADD INDEX `fky_edg_unv_idx` (`serial_unv` ASC);
ALTER TABLE `employee_degree` 
ADD CONSTRAINT `fky_edg_sch`
  FOREIGN KEY (`serial_sch`)
  REFERENCES `school` (`serial_sch`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fky_edg_unv`
  FOREIGN KEY (`serial_unv`)
  REFERENCES `university` (`serial_unv`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;


ALTER TABLE `scale_time_dedication` 
ADD COLUMN `division_factor_std` ENUM('YES', 'NO') NULL AFTER `percentage_std`;


ALTER TABLE `employee_scale_total_school_year` 
CHANGE COLUMN `serial_est` `serial_est` INT(11) NOT NULL AUTO_INCREMENT ,
ADD COLUMN `salary_est` DECIMAL(6,2) NULL AFTER `score_total_ajusted_est`;



CREATE TABLE `scale_schedule` (
  `serial_ssh` INT NOT NULL AUTO_INCREMENT,
  `name_ssh` TEXT NULL,
  `status_ssh` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_ssh`));

CREATE TABLE `employee_scale_schedule` (
  `serial_ess` INT NOT NULL AUTO_INCREMENT,
  `serial_emp` INT NULL,
  `serial_ssh` INT NULL,
  `serial_scy` INT NULL,
  `status_ess` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_ess`),
  INDEX `fk_ssc_emp_idx` (`serial_emp` ASC),
  INDEX `fk_ess_ssh_idx` (`serial_ssh` ASC),
  INDEX `fk_ess_scy_idx` (`serial_scy` ASC),
  CONSTRAINT `fk_ess_emp`
    FOREIGN KEY (`serial_emp`)
    REFERENCES `employee` (`serial_emp`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_ess_ssh`
    FOREIGN KEY (`serial_ssh`)
    REFERENCES `scale_schedule` (`serial_ssh`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_ess_scy`
    FOREIGN KEY (`serial_scy`)
    REFERENCES `school_year` (`serial_scy`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `employee_observation` (
  `serial_eob` INT NOT NULL AUTO_INCREMENT,
  `serial_scy` INT NULL,
  `observations_eob` TEXT NULL,
  `type` SET('SCALE') NULL,
  `status_eob` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_eob`));


ALTER TABLE `employee_observation` 
CHANGE COLUMN `type` `type_eob` SET('SCALE') NULL DEFAULT NULL ,
ADD COLUMN `serial_emp` INT NULL AFTER `serial_scy`,
ADD INDEX `fk_eob_emp_idx` (`serial_emp` ASC),
ADD INDEX `fk_eob_scy_idx` (`serial_scy` ASC);
ALTER TABLE `employee_observation` 
ADD CONSTRAINT `fk_eob_emp`
  FOREIGN KEY (`serial_emp`)
  REFERENCES `employee` (`serial_emp`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_eob_scy`
  FOREIGN KEY (`serial_scy`)
  REFERENCES `school_year` (`serial_scy`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;


INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `status_prc`) VALUES ('640', '52', 'Escalafón de empleados', 'laravel/public/employee', 'LOCKABLE');
insert into allowed_pages_by_process values('640','employeecontroller@getindex');
insert into allowed_pages_by_process values('640','employeecontroller@getemployees');
insert into allowed_pages_by_process values('640','employeecontroller@getemployee');
insert into allowed_pages_by_process values('640','employeecontroller@postemployee');
insert into allowed_pages_by_process values('640','employeecontroller@getemployeeresponsabilities');
insert into allowed_pages_by_process values('640','employeecontroller@getemployeeresponsabilitiestoadd');
insert into allowed_pages_by_process values('640','employeecontroller@gettraining');
insert into allowed_pages_by_process values('640','employeecontroller@getobservations');
insert into allowed_pages_by_process values('640','employeecontroller@getpublication');
insert into allowed_pages_by_process values('640','employeecontroller@getacknowledgement');
insert into allowed_pages_by_process values('640','employeecontroller@getpersonaldata');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeeresponsabilities');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeeacademiccharge');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeetimededication');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeescalelanguaje');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeescaledegree');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeescaleschoolyear');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveexperienceoutinstitution');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeeexperience');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeepublication');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeeacknowledgement');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeetrainig');
insert into allowed_pages_by_process values('640','employeecontroller@getemployeedegree');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeedegree');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeescaleschedule');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeeobservation');
insert into allowed_pages_by_process values('640','employeecontroller@gettotals');
insert into allowed_pages_by_process values('640','employeecontroller@getscale');
insert into allowed_pages_by_process values('640','acknowledgementcontroller@postsave');
insert into allowed_pages_by_process values('640','trainingcoursecontroller@postsave');
insert into allowed_pages_by_process values('640','institutiontrainingcontroller@getindex');
insert into allowed_pages_by_process values('640','institutiontrainingcontroller@getinfo');
insert into allowed_pages_by_process values('640','institutiontrainingcontroller@getscaleinfodelete');
insert into allowed_pages_by_process values('640','institutiontrainingcontroller@postsave');
insert into allowed_pages_by_process values('640','publicationcontroller@postsave');
insert into allowed_pages_by_process values('640','employeecontroller@postsaveemployeeauxiliarteacher');
insert into allowed_pages_by_process values('640','scalecodificationcontroller@getperiodclassbyscalecodification');
insert into allowed_pages_by_process values('640','scaletrainingtypecontroller@gettrainigtypeinfo');

INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `status_prc`) VALUES ('641', '52', 'Imprimir escalafón', 'laravel/public/recalculateScale', 'LOCKABLE');
insert into allowed_pages_by_process values('641','recalculateemployeescalecontroller@getindex');
insert into allowed_pages_by_process values('641','recalculateemployeescalecontroller@postgeneratereport');
insert into allowed_pages_by_process values('641','recalculateemployeescalecontroller@posttraining');
insert into allowed_pages_by_process values('641','recalculateemployeescalecontroller@postexperience');

UPDATE `school_year` SET `activities_scy`='INSCRIPTION,EXTRACURRICULAR,CRON,ENABLE_SCALE' WHERE `serial_scy`='3';

CREATE TABLE `scale_setup` (
  `serial_sst` INT NOT NULL AUTO_INCREMENT,
  `max_points_publication_sst` DECIMAL(5,2) NULL,
  `max_points_acknowledgement_sst` DECIMAL(5,2) NULL,
  `education_points_sst` DECIMAL(5,2) NULL,
  `special_language_points_sst` DECIMAL(5,2) NULL,
  `number_years_short_term_back_sst` DECIMAL(5,2) NULL,
  `division_factor_time_dedication_sst` DECIMAL(5,2) NULL,
  `date_experience_sst` VARCHAR(45) NULL,
  `value_point_sst` DECIMAL(5,2) NULL,
  `special_points_diploma_sst` DECIMAL(5,2) NULL,
  `auxiliar_teacher_points_sst` DECIMAL(5,2) NULL,
  `status_sst` ENUM('ACTIVE', 'INACTIVE') NULL,
  PRIMARY KEY (`serial_sst`));

ALTER TABLE `employee_scale_total_school_year` 
CHANGE COLUMN `score_total_ajusted_est` `score_total_ajusted_est` DECIMAL(6,2) NULL DEFAULT NULL ;

INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `name_2_lst`, `alias_sct`, `status_sct`) VALUES ('1', 'Titulación', 'Titulación', 'DEGREE', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `name_2_lst`, `alias_sct`, `status_sct`) VALUES ('2', 'Educación:', '', 'EDUCATION', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('3', 'Profesor auxiliar', 'AUXILIAR_TEACHER', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('4', 'Diplomado', 'DIPLOMA', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('5', 'Especial', 'SPECIAL_LANGUAGE', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('6', 'Idiomas', 'LANGUAGE', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('7', 'Tiempo de Experiencia:', 'EXPERIENCE_TIME', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `name_2_lst`, `alias_sct`, `status_sct`) VALUES ('8', 'Fuera de la institución:', 'Años fuera de la institución:', 'YEARS_OUT', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `name_2_lst`, `alias_sct`, `status_sct`) VALUES ('9', 'Fuera de la institución:', 'Puntos fuera de la institución:', 'POINTS_OUT', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `name_2_lst`, `alias_sct`, `status_sct`) VALUES ('10', 'Dentro de la institución:', 'Años dentro de la institución:', 'YEARS_IN', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `name_2_lst`, `alias_sct`, `status_sct`) VALUES ('11', 'Dentro de la institución:', 'Puntos dentro de la institución:', 'POINTS_IN', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('12', 'Publicaciones', 'PUBLICATION', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('13', 'Reconocimientos:', 'ACKNOWLEDGEMENT', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `name_2_lst`, `alias_sct`, `status_sct`) VALUES ('14', 'Otros fijos:', 'Observaciones otros fijos:', 'OTHER_FIXED', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('15', 'Carga académica', 'ACADEMIC_CHARGE', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('16', 'Capacitación de largo plazo', 'TRAINING_LARGE_TERM', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `name_2_lst`, `alias_sct`, `status_sct`) VALUES ('17', 'Capacitación de corto plazo', 'Horas', 'TRAINING_SHORT_TERM', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `name_2_lst`, `alias_sct`, `status_sct`) VALUES ('18', 'Otros móviles:', 'Observaciones otros móviles:', 'OTHER_MOBILE', 'ACTIVE');
INSERT INTO `scale_list` (`serial_sct`, `name_sct`, `alias_sct`, `status_sct`) VALUES ('19', 'Resp. institucional', 'INSTITUTIONAL_RESPONSABILITY', 'ACTIVE');


INSERT INTO `process` (`serial_prc`, `name_prc`, `link_prc`, `status_prc`) VALUES ('642', 'Escalafón', '#', 'LOCKABLE');
UPDATE `process` SET `prc_serial_prc`='642' WHERE `serial_prc`='638';
UPDATE `process` SET `prc_serial_prc`='642' WHERE `serial_prc`='640';
UPDATE `process` SET `prc_serial_prc`='642' WHERE `serial_prc`='641';

