insert into  allowed_pages_by_process (serial_prc,url_dsc)values('635','DceController@postLoadSocioeconomicData');
insert into  allowed_pages_by_process (serial_prc,url_dsc)values('635','DceController@postSaveDateEntryStudent');
insert into  allowed_pages_by_process (serial_prc,url_dsc)values('635','DceController@postSaveOptionSocioeconomicData');
insert into  allowed_pages_by_process (serial_prc,url_dsc)values('742','DceController@postDcepdfreportwindowdocumentsguardian');

-- creo tabla para controlar documentos por nivel por año lectivo
CREATE TABLE IF NOT EXISTS socioeconomic_student (
  serial_scm int NOT NULL AUTO_INCREMENT,
  serial_std int NULL NULL DEFAULT NULL,
  income_mother DECIMAL (7,2) NULL DEFAULT NULL,
  expenses_mother DECIMAL (7,2) NULL DEFAULT NULL,
  income_father DECIMAL (7,2) NULL DEFAULT NULL,
  expenses_father DECIMAL (7,2) NULL DEFAULT NULL,
  income_other DECIMAL (7,2) NULL DEFAULT NULL,
  expenses_other DECIMAL (7,2) NULL DEFAULT NULL,
  type_housing set('OWN','LEASE','ANTICHRESIS') DEFAULT NULL,
  num_room int DEFAULT NULL,
  num_bathroom int DEFAULT NULL,
  services set('ELECTRIC','WATER','PHONE','INTERNET') DEFAULT NULL,
  status_scm enum('ACTIVE','INACTIVE') DEFAULT 'ACTIVE',
  PRIMARY KEY (serial_scm)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


-- medical file datos de contacto de emergencia
ALTER TABLE medical_file
ADD COLUMN `emergency_call_relationship_mdf` TEXT NULL DEFAULT NULL AFTER `emergency_call_name2_mdf`;
ALTER TABLE medical_file
ADD COLUMN `emergency_call_relationship2_mdf` TEXT NULL DEFAULT NULL AFTER `emergency_call_relationship_mdf`;

-- campo abierto de discapacidades
ALTER TABLE dce_counseling_department
ADD COLUMN `relatives_disabilities_text` TEXT NULL DEFAULT NULL AFTER relatives_type_disabilities;
-- edad del padre cuando la madre se embarazo
ALTER TABLE dce_counseling_department
ADD COLUMN `age_father_pregnancy` TEXT NULL DEFAULT NULL AFTER age_mother_pregnancy;
-- area social emocional
ALTER TABLE dce_counseling_department
ADD COLUMN `social_emotional_area` TEXT NULL DEFAULT NULL AFTER corrective_devices;
-- accidentes en la infancia
ALTER TABLE dce_counseling_department
ADD COLUMN `childhood_accidents` TEXT NULL DEFAULT NULL AFTER social_emotional_area;
-- sueños pesadillas
ALTER TABLE dce_counseling_department
ADD COLUMN `nightmare_dreams` TEXT NULL DEFAULT NULL AFTER childhood_accidents;
-- dificultades en el embarazo
ALTER TABLE dce_counseling_department
ADD COLUMN `emotional_difficulty_pregnancy` TEXT NULL DEFAULT NULL AFTER nightmare_dreams;
-- datos medicos importantes
ALTER TABLE medical_file
ADD COLUMN `important_medical_data` TEXT NULL DEFAULT NULL AFTER weight_mdf;
-- datos medicos importantes
ALTER TABLE dce_counseling_department
ADD COLUMN `difficultyy_child_birth` TEXT NULL DEFAULT NULL AFTER difficulty_giving_birth;
-- Atención / concentración / memoria:
ALTER TABLE dce_counseling_department
ADD COLUMN `attention_concentration_memory` TEXT NULL DEFAULT NULL AFTER childhood_accidents;
-- student another_person_lives_std
ALTER TABLE student
ADD COLUMN `another_person_lives_std` TEXT NULL DEFAULT NULL AFTER lives_with_std;
--
ALTER TABLE dce_family_references
ADD COLUMN `course_sibling` TEXT NULL DEFAULT NULL AFTER student_another_school;

-- persona que recibe al estudiante
ALTER TABLE dce_year_data
ADD COLUMN `person_receives` TEXT NULL DEFAULT NULL AFTER time_share_with_parents;
-- hora de llegada madre
ALTER TABLE dce_year_data
ADD COLUMN `mother_arrival` TEXT NULL DEFAULT NULL AFTER person_receives;
-- hora de llegada padre
ALTER TABLE dce_year_data
ADD COLUMN `father_arrival` TEXT NULL DEFAULT NULL AFTER mother_arrival;
-- apoyo en tareas
ALTER TABLE dce_year_data
ADD COLUMN `homework_support` TEXT NULL DEFAULT NULL AFTER father_arrival;
-- relaciones interpersonales en el hogar
ALTER TABLE dce_year_data
ADD COLUMN `relationships_family` set('VERY_SATISTACTORY','SATISTACTORY','UNSATISTACTORY') NULL DEFAULT NULL AFTER homework_support;
-- descripcion relaciones interpersonales en el hogar
ALTER TABLE dce_year_data
ADD COLUMN `description_relationships_family` TEXT NULL DEFAULT NULL AFTER relationships_family;
-- descripcion relaciones interpersonales en el hogar
ALTER TABLE dce_year_data
ADD COLUMN `academic_leveling_description` TEXT NULL DEFAULT NULL AFTER academic_leveling;
-- descripcion relaciones interpersonales en el hogar
ALTER TABLE dce_year_data
ADD COLUMN `therapies` set('LANGUAGE','PSYCHO','EMOTIONAL','NEUROLOGICAL') NULL DEFAULT NULL AFTER fears;

ALTER TABLE dce_year_data
ADD COLUMN `another_therapies` TEXT NULL DEFAULT NULL AFTER therapies;

-- student another_person_lives_std
ALTER TABLE student
ADD COLUMN `lives_with_std_dce` set ('PARENTS','MOTHER','FATHER','SIBLING','GRANDPARENT','AUNT_UNCLE','OTHER') NULL DEFAULT NULL AFTER another_person_lives_std;

