CREATE TABLE `employee_field_report` (
  `serial_efr` INT NOT NULL AUTO_INCREMENT,
  `text_field_efr` VARCHAR(200) NULL,
  `employee_field_efr` VARCHAR(200) NULL,
  `shoh_in_view_efr` ENUM('YES', 'NO') NULL,
  `order_efr` INT NULL,
  `group_efr` VARCHAR(200) NULL,
  PRIMARY KEY (`serial_efr`));
  
    ALTER TABLE `employee_field_report` 
ADD COLUMN `group_col` INT NULL AFTER `group_efr`;

ALTER TABLE `employee_field_report` 
ADD COLUMN `status_efr` ENUM('ACTIVE', 'INACTIVE') NULL AFTER `group_col`;

ALTER TABLE `employee_field_report` 
ADD COLUMN `employee_table_efr` ENUM('YES', 'NO') NULL AFTER `status_efr`;

ALTER TABLE `employee_field_report` 
CHANGE COLUMN `employee_table_efr` `employee_table_efr` ENUM('YES', 'NO') NULL DEFAULT NULL AFTER `group_col`;

INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('1', 'Identificación', 'id_emp', 'YES', '1', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('2', 'Apellidos', 'last_name_emp', 'YES', '2', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('3', 'Titulación', 'DEGREE', 'YES', '3', 'Escalafón', '2', 'NO', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('4', 'Idiomas', 'LANGUAGE', 'YES', '4', 'Escalafón', '2', 'NO', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('5', 'Carga Académica', 'ACADEMIC_CHARGE', 'YES', '5', 'Escalafón', '2', 'NO', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('6', 'Resp. Institucional', 'INSTITUTIONAL_RESPONSABILITY', 'YES', '6', 'Escalafón', '2', 'NO', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('7', 'Capacitación largo plazo (horas)', 'TRAINING_LARGE_TERM', 'YES', '7', 'Escalafón', '2', 'NO', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('8', 'Capacitación corto plazo (horas)', 'TRAINING_SHORT_TERM', 'YES', '8', 'Escalafón', '2', 'NO', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('9', 'Años fuera de la institución', 'YEARS_OUT', 'YES', '9', 'Escalafón', '2', 'NO', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('10', 'Años dentro de la institución', 'YEARS_IN', 'YES', '10', 'Escalafón', '2', 'NO', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('11', 'Horario', 'SCHEDULE', 'YES', '11', 'Escalafón', '2', 'NO', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('12', 'Nombres', 'first_name_emp', 'YES', '12', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('13', 'Fecha Nacimiento', 'birthdate_emp', 'YES', '13', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('14', 'Edad', 'how_old', 'YES', '14', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('15', 'Género', 'gender', 'YES', '15', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('16', 'País de Nacimiento', 'birthcountry', 'YES', '16', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('17', 'Provincia/estado de Nacimiento', 'birthstate', 'YES', '17', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('18', 'Ciudad de Nacimiento', 'city_emp', 'YES', '18', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('19', 'Estado Civil', 'marital_status', 'YES', '19', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('20', 'Nacionalidad', 'name_nnt', 'YES', '20', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('21', 'Nacionalidad 2', 'name_nnt2', 'YES', '21', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('22', 'Teléfono', 'phone_emp', 'YES', '22', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('23', 'Celular', 'cellphone_emp', 'YES', '23', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('24', 'Correo electrónico', 'email_emp', 'YES', '24', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('25', 'Cuenta Bancaria', 'bank_account_emp', 'YES', '25', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('26', 'Contacto de Emergencia', 'emergency_contact_emp', 'YES', '27', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('27', 'Relación Contacto Emergencia', 'relationship_emergency_emp', 'YES', '28', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('28', 'Teléfono de Emergencia', 'celphone_emergency_emp', 'YES', '29', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('29', 'Cargas familiares', 'family_dependents_emp', 'YES', '30', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('30', 'Cargas estudiantiles', 'student_dependents_emp', 'YES', '31', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('31', 'Pasaporte', 'passport', 'YES', '32', 'Campos comunes', '1', 'YES', 'ACTIVE');
INSERT INTO `employee_field_report` (`serial_efr`, `text_field_efr`, `employee_field_efr`, `shoh_in_view_efr`, `order_efr`, `group_efr`, `group_col`, `employee_table_efr`, `status_efr`) VALUES ('32', 'Cónyuge', 'spouse_emp', 'YES', '26', 'Campos comunes', '1', 'YES', 'ACTIVE');

INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `status_prc`) VALUES ('665', '642', 'Reporte de empleados', 'laravel/public/reportEmployee', 'LOCKABLE');
insert into allowed_pages_by_process values(665,'reportemployeecontroller@getindex');
insert into allowed_pages_by_process values(665,'reportemployeecontroller@postgeneratereport');
