
DROP TABLE IF EXISTS `cuestionario_alumno_2`;

CREATE TABLE
  `cuestionario_alumno_2` (
    `idCuestionarioAlumno2` INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
    `createdAt` DATETIME,
    `p12_A_1` VARCHAR(20),
    `p12_A_2` VARCHAR(20),
    `p12_A_3` VARCHAR(20),
    `p12_A_4` VARCHAR(20),
    `p12_B_1` VARCHAR(20),
    `p12_B_2` VARCHAR(20),
    `p12_B_3` VARCHAR(20),
    `p12_B_4` VARCHAR(20),
    `p12_C_1` VARCHAR(20),
    `p12_C_2` VARCHAR(20),
    `p12_C_3` VARCHAR(20),
    `p12_C_4` VARCHAR(20),
    `p10_1` VARCHAR(20),
    `p10_2` VARCHAR(20),
    `p10_3` VARCHAR(20),
    `p11_1` VARCHAR(20),
    `p11_2` VARCHAR(20),
    `p11_3` VARCHAR(20),
    `p11_4` VARCHAR(20),
    `p17_1` VARCHAR(20),
    `p17_2` VARCHAR(20),
    `p17_3` VARCHAR(20),
    `p3_1` VARCHAR(50),
    `p3_2` VARCHAR(50),
    `p3_3` VARCHAR(50),
    `p3_4` VARCHAR(50),
    `p12_D_1` VARCHAR(50),
    `p12_D_2` VARCHAR(50),
    `p12_D_3` VARCHAR(50),
    `p12_D_4` VARCHAR(50),
    `p12_D_5` VARCHAR(50),
    `p1` TEXT,
    `p2` VARCHAR(50),
    `p4` VARCHAR(50),
    `p5` VARCHAR(50),
    `p6` VARCHAR(50),
    `p7` VARCHAR(50),
    `p8` VARCHAR(50),
    `p9` VARCHAR(50),
    `p13` VARCHAR(50),
    `p14` VARCHAR(50),
    `p15` VARCHAR(50),
    `p16` VARCHAR(50),
    `p18` VARCHAR(50)
  );

DROP TABLE IF EXISTS `cuestionario_programa_2`;

CREATE TABLE
  `cuestionario_programa_2` (
    `idCuestionarioPrograma2` INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
     `createdAt` DATETIME,
    `p3_A_1` VARCHAR(50),
    `p3_A_2` VARCHAR(50),
    `p3_A_3` VARCHAR(50),
    `p3_A_4` VARCHAR(50),
    `p3_B_1` VARCHAR(50),
    `p3_B_2` VARCHAR(50),
    `p3_B_3` VARCHAR(50),
    `p3_B_4` VARCHAR(50),
    `p3_C_1` VARCHAR(50),
    `p3_C_2` VARCHAR(50),
    `p3_C_3` VARCHAR(50),
    `p3_C_4` VARCHAR(50),
    `p3_C_5` VARCHAR(50),
    `p3_D_1` VARCHAR(50),
    `p3_D_2` VARCHAR(50),
    `p3_D_3` VARCHAR(50),
    `p3_D_4` VARCHAR(50),
    `p3_D_5` VARCHAR(50),
    `p3_E_1` VARCHAR(50),
    `p1` VARCHAR(50),
    `p2` VARCHAR(50),
    `p4` VARCHAR(50),
    `p5` VARCHAR(50),
    `p6` VARCHAR(50),
    `p7` VARCHAR(50)
  );



ALTER TABLE servicio ADD COLUMN idCuestionarioAlumno2 INT;
ALTER TABLE servicio ADD COLUMN idCuestionarioPrograma2 INT;

ALTER TABLE `servicio` ADD FOREIGN KEY (`idCuestionarioAlumno2`) REFERENCES `cuestionario_alumno_2` (`idCuestionarioAlumno2`);
ALTER TABLE `servicio` ADD FOREIGN KEY (`idCuestionarioPrograma2`) REFERENCES `cuestionario_programa_2` (`idCuestionarioPrograma2`);


