diff --git a/src/db/migration/V20211025_1553__mantis23090.sql b/src/db/migration/V20211025_1553__mantis23090.sql new file mode 100644 index 000000000..e0f035c95 --- /dev/null +++ b/src/db/migration/V20211025_1553__mantis23090.sql @@ -0,0 +1,17 @@ +declare + dup_val_on_index exception; + except_02291 exception; + + pragma exception_init (dup_val_on_index , -00001); + pragma exception_init (except_02291 , -02291); +begin + execute immediate + 'INSERT INTO funcion_sistema (FUNCIONSISTEMA_ID,SISTEMA_ID,NOMBFUNCION,DESCRUTA,ACTIVO,FECMODIF,USUARIO_ID) + VALUES + (funcion_sistema_seq.NEXTVAL, 2, ''VDA > RECEITA/DESPESA > RECARGA PIN'', + ''COM.RJCONSULTORES.VENTABOLETOS.GUI.VENTA.MENU.ITENS.ITEMMENURECARGAPIN'', 1, SYSDATE, 1)'; + + exception + when dup_val_on_index then null; + when except_02291 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20211029_1548__mantis23090.sql b/src/db/migration/V20211029_1548__mantis23090.sql new file mode 100644 index 000000000..ed0eb03d1 --- /dev/null +++ b/src/db/migration/V20211029_1548__mantis23090.sql @@ -0,0 +1,56 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE RECARGA_CELULAR ADD (TIPO_RECARGA NUMBER(2,0))'; + exception when column_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate 'update RECARGA_CELULAR set TIPO_RECARGA = 0 where activo = 1'; + exception when object_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE RECARGA_CELULAR ADD (AFFILIATION_KEY VARCHAR(20),SIGNER_CODE VARCHAR(20), SERIAL_NUMBER VARCHAR(20))'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE RECARGA_CELULAR MODIFY (CELL_PHONE_NUMBER NULL)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE RECARGA_CELULAR MODIFY (NSU NULL)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE RECARGA_CELULAR MODIFY (AUTHORIZATION_CODE NULL)'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE RECARGA_CELULAR MODIFY (FACE_AMOUNT NULL)'; + exception when column_exists then null; +end; +/ \ No newline at end of file