diff --git a/src/db/migration/V20170921_2014__mantis9716.sql b/src/db/migration/V20170921_2014__mantis9716.sql new file mode 100644 index 000000000..e1e803629 --- /dev/null +++ b/src/db/migration/V20170921_2014__mantis9716.sql @@ -0,0 +1,18 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE MOTIVO_CANCELACION ADD( CVESISTEMA VARCHAR2(30))'; + execute immediate 'alter table MOTIVO_CANCELACION add constraint mc_uniq_cvesistema unique("CVESISTEMA")'; + exception when column_exists then null; +end; +/ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'alter session set nls_numeric_characters = '',.'' '; + execute immediate 'Insert into MOTIVO_CANCELACION (MOTIVOCANCELACION_ID,DESCMOTIVO,TIPOMOTIVO,ACTIVO,FECMODIF,USUARIO_ID,CVESISTEMA) +values (MOTIVO_CANCELACION_SEQ.nextval,''CANCELAMENTO ECF'',''B'',1,sysdate,1,''CANCELAMENTO_ECF'')'; + exception when dup_val_on_index then null; +end;