ALTER TABLE `year_level_specialty_payment_concept` 
ADD COLUMN `comment_ypc` text NULL DEFAULT '' AFTER `value_dicount_last_year_ypc`,
ADD COLUMN `include_iva_ypc` ENUM('YES', 'NO') NULL DEFAULT 'YES' AFTER `comment_ypc`;

ALTER TABLE `process` 
ADD COLUMN `app_prc` ENUM('YES', 'NO') NULL AFTER `allow_prc`;

INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('862', '52', 'Inscripción Directa sin representante', 'modules/registration/fNewRegistrationNoGuardians', '102.00', 'LOCKABLE');
INSERT INTO `invoice_header_data` (`serial_inv`, `in_use_inv`, `status_inv`, `serial_pcg`, `enviroment_inv`, `business_name_inv`, `ruc_inv`, `docuement_code_inv`, `establishment_inv`, `issuing_point_inv`, `address_inv`, `trade_name_inv`, `currency_inv`, `payment_mode_inv`, `time_unit_inv`) VALUES ('1', '1', 'ACTIVE', '1', '1', '**PRUEBAS** - FULBRIGHT', '17..', '01', '001', '050', 'Diego de Almagro N25-41 y Av. Colón,', '**PRUEBAS** -  FULBRIGHT', 'DOLAR', '20', '');

ALTER TABLE `student_year_quota` 
ADD COLUMN `comment_syq` VARCHAR(100) NULL AFTER `ip_address_syq`;

ALTER TABLE `student_current_deferred_dates_to_pay_payment_concept` 
ADD COLUMN `start_date_deb` DATE NULL AFTER `serial_std`;

ALTER TABLE `invoice_detail` 
ADD COLUMN `serial_cdf_fedding` INT NULL AFTER `serial_phy`;

ALTER TABLE `payment_detail_total_invoice` 
DROP FOREIGN KEY `fk_pst_debt`;


ALTER TABLE `school_year` 
ADD COLUMN `start_date_matricule_process_scy` DATETIME NULL AFTER `options_scy`,
ADD COLUMN `end_date_matricule_process_scy` DATETIME NULL AFTER `start_date_matricule_process_scy`,
ADD COLUMN `url_scedule_scy` TEXT NULL AFTER `end_date_matricule_process_scy`;

ALTER TABLE `text_email` 
CHANGE COLUMN `alias_txn` `alias_txn` ENUM('DEBTOR', 'PAYMENT_CARD', 'REGISTER_PAYMENT', 'NOTIFICATION') NULL DEFAULT NULL ;


ALTER TABLE `school_year` 
ADD COLUMN `terms_and_conditions_scy` TEXT NULL AFTER `url_scedule_scy`;

CREATE TABLE `schedule_inscription` (
  `serial_scn` INT NOT NULL AUTO_INCREMENT,
  `serial_scy` INT NULL,
  `name_scn` VARCHAR(45) NULL,
  `status_scn` ENUM('ACTIVE', 'INACTIVE') NULL DEFAULT 'ACTIVE',
  PRIMARY KEY (`serial_scn`));
  
  INSERT INTO `schedule_inscription` (`serial_scy`, `name_scn`) VALUES ('2', '07H00-09h00');
INSERT INTO `schedule_inscription` (`serial_scy`, `name_scn`) VALUES ('2', '019H00-21h00');
ALTER TABLE `student_year` 
ADD COLUMN `serial_scn` INT NULL AFTER `extracurricular_service`,
ADD INDEX `fk_scy_scn_idx` (`serial_scn` ASC);
ALTER TABLE `student_year` 
ADD CONSTRAINT `fk_scy_scn`
  FOREIGN KEY (`serial_scn`)
  REFERENCES `schedule_inscription` (`serial_scn`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
;


ALTER TABLE `payment_method` 
ADD COLUMN `url_img_pym` VARCHAR(200) NULL AFTER `acount_banck_pym`;

ALTER TABLE `school_year` 
ADD COLUMN `indications_scy` TEXT NULL DEFAULT NULL AFTER `terms_and_conditions_scy`;

ALTER TABLE `school_year` 
ADD COLUMN `schedule_scy` TEXT NULL AFTER `indications_scy`;

ALTER TABLE `school_year` 
ADD COLUMN `schedule_file_scy` TEXT NULL AFTER `schedule_scy`;

ALTER TABLE `text_email` 
ADD COLUMN `created_at` DATETIME NULL AFTER `status_txn`,
ADD COLUMN `updated_at` DATETIME NULL AFTER `created_at`;

ALTER TABLE `school_year` 
CHANGE COLUMN `schedule_scy` `schedule_text_scy` TEXT NULL DEFAULT NULL ;


INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('865', '147', 'Notificaciones', 'laravel/public/notification', '1', 'LOCKABLE');
insert into allowed_pages_by_process values(865,'notificationcontroller@getindex');
insert into allowed_pages_by_process values(865,'notificationcontroller@poststudents');
insert into allowed_pages_by_process values(865,'notificationcontroller@postsendemails');


INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('866', '39', 'Configuraciçon de matrículas', 'laravel/public/insciptionScyController', '1', 'LOCKABLE');
insert into allowed_pages_by_process values(866,'insciptionschoolyearcontroller@getindex');
insert into allowed_pages_by_process values(866,'insciptionschoolyearcontroller@getinfo');
insert into allowed_pages_by_process values(866,'insciptionschoolyearcontroller@postsave');

ALTER TABLE `financial_institution` 
DROP COLUMN `OCP`;

INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('867', '156', 'Reporte de inscripciones', 'laravel/public/inscriptionReport', '2', 'LOCKABLE');
insert into allowed_pages_by_process values(865,'inscriptionreportcontroller@getindex');
insert into allowed_pages_by_process values(865,'inscriptionreportcontroller@getinvoicemonth');
insert into allowed_pages_by_process values(865,'inscriptionreportcontroller@getpaymentconceptgroups');
insert into allowed_pages_by_process values(865,'inscriptionreportcontroller@postcompletereport');

ALTER TABLE `school_setup`
ADD COLUMN `title_process_wizard` VARCHAR(200) NULL DEFAULT 'PROCESO DE ACTUALIZACIÓN DE DATOS' AFTER `secret_key_sst`;

INSERT INTO `process` (`serial_prc`, `prc_serial_prc`, `name_prc`, `link_prc`, `weight_prc`, `status_prc`) VALUES ('868', '402', 'Información gereal de estudiantes', 'laravel/public/inscriptionReport', '1', 'LOCKABLE');
insert into allowed_pages_by_process values('868','informationstudentreportcontroller@getindexng');
insert into allowed_pages_by_process values('868','informationstudentreportcontroller@postreportng');


ALTER TABLE `school_year` 
ADD COLUMN `inscription_tex_scy` TEXT NULL AFTER `schedule_file_scy`;

ALTER TABLE `school_year` 
ADD COLUMN `schedule_register_text_scy` TEXT NULL AFTER `inscription_tex_scy`;

ALTER TABLE `student_year_quota` 
CHANGE COLUMN `comment_syq` `comment_syq` TEXT CHARACTER SET 'utf8' COLLATE 'utf8_spanish_ci' NULL DEFAULT NULL ;

UPDATE `process` SET `name_prc`='Información general de estudiantes' WHERE `serial_prc`='868';
UPDATE `process` SET `name_prc`='Inscripción Directa' WHERE `serial_prc`='862';

insert into allowed_pages_by_process values(717,'paymentmanagecontroller@postrecipet');
insert into allowed_pages_by_process values(717,'paymentmanagecontroller@postschedules');
insert into allowed_pages_by_process values(717,'paymentmanagecontroller@postsaveschedule');

INSERT INTO `financial_institution` (`serial_fin`, `name_fin`, `ocp_fin`, `status_fin`) VALUES ('14', 'PAYPHONE', 'NO', 'ACTIVE');
INSERT INTO `financial_institution_card` (`serial_fin`, `serial_ccd`, `wizard_fic`, `current_deferred_fic`, `status_fic`) VALUES ('14', '1', 'YES', 'YES', 'ACTIVE');

ALTER TABLE `current_deferred` 
ADD COLUMN `intertest_amount_cdf` DOUBLE NULL AFTER `paid_quotas_cdf`,
ADD COLUMN `installment_amount_cdf` DOUBLE NULL AFTER `intertest_amount_cdf`,
ADD COLUMN `total_amount_cdt` DOUBLE NULL AFTER `installment_amount_cdf`,
ADD COLUMN `current_deferredcol` VARCHAR(45) NULL AFTER `document_cdf`;