diff --git a/src/db/migration/V20201023_1512__mantis20410.sql b/src/db/migration/V20201023_1512__mantis20410.sql new file mode 100644 index 000000000..02bba0e82 --- /dev/null +++ b/src/db/migration/V20201023_1512__mantis20410.sql @@ -0,0 +1,15 @@ +declare + object_exists exception; + except_01451 exception; + except_01442 exception; + + pragma exception_init (object_exists , -01430); + pragma exception_init (except_01451 , -01451); + pragma exception_init (except_01442 , -01442); +begin + execute immediate 'ALTER TABLE EMPRESA ADD URLBASESEGURO VARCHAR2(50)'; + exception + when object_exists then null; + when except_01451 then null; + when except_01442 then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20201023_1615__mantis20410.sql b/src/db/migration/V20201023_1615__mantis20410.sql new file mode 100644 index 000000000..5cfd70985 --- /dev/null +++ b/src/db/migration/V20201023_1615__mantis20410.sql @@ -0,0 +1,7 @@ +declare + dup_val_on_index exception; + pragma exception_init (dup_val_on_index , -00001); +begin + execute immediate 'Insert into CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE,DESCCONSTANTE,INDTIPOCONSTANTE,VALORCONSTANTE,INDMANTENIMIENTOUSUARIO,ACTIVO,FECMODIF,USUARIO_ID) values (CONSTANTE_SEQ.NEXTVAL,''CHAVE_CRIPTOGRAFIA_SEGURO_W2I'',''CHAVE CRIPTOGRAFIA SEGURO W2I'',''1'',''2'',''1'',''1'',sysdate,''1'')'; + exception when dup_val_on_index then null; +end; diff --git a/src/db/postgresql/migration/V20201023_1512__mantis20410.sql b/src/db/postgresql/migration/V20201023_1512__mantis20410.sql new file mode 100644 index 000000000..3774563af --- /dev/null +++ b/src/db/postgresql/migration/V20201023_1512__mantis20410.sql @@ -0,0 +1,6 @@ +DO $$ +BEGIN + ALTER TABLE EMPRESA ADD (URLBASESEGURO VARCHAR(50)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20201023_1615__mantis20410.sql b/src/db/postgresql/migration/V20201023_1615__mantis20410.sql new file mode 100644 index 000000000..513c0da29 --- /dev/null +++ b/src/db/postgresql/migration/V20201023_1615__mantis20410.sql @@ -0,0 +1,8 @@ +DO $$ +BEGIN + INSERT INTO CONSTANTE (CONSTANTE_ID, NOMBCONSTANTE, DESCCONSTANTE, VALORCONSTANTE, INDTIPOCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) VALUES (nextval('CONSTANTE_SEQ'), 'CHAVE_CRIPTOGRAFIA_SEGURO_W2I', 'CHAVE CRIPTOGRAFIA SEGURO W2I', 'FALSE', '', '1', '1', now(), '1'); + EXCEPTION + WHEN OTHERS THEN NULL; + WHEN unique_violation THEN NULL; +END +$$; \ No newline at end of file