diff --git a/src/db/migration/V20181025_1620__mantis12434.sql b/src/db/migration/V20181025_1620__mantis12434.sql new file mode 100644 index 000000000..3770f124a --- /dev/null +++ b/src/db/migration/V20181025_1620__mantis12434.sql @@ -0,0 +1,8 @@ +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,''EMPRESA_GENERA_FACTURA_ELETRONICA_SICFE'',''EMPRESAS HABILITADAS PARA GERAR FACTURA ELETRONICA - SICFE'',0,''15'',0,1,sysdate,-1)'; + exception when dup_val_on_index then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20181025_1620__mantis12434.sql b/src/db/postgresql/migration/V20181025_1620__mantis12434.sql new file mode 100644 index 000000000..c37e6d121 --- /dev/null +++ b/src/db/postgresql/migration/V20181025_1620__mantis12434.sql @@ -0,0 +1,9 @@ +DO $$ +BEGIN +Insert into CONSTANTE (CONSTANTE_ID,NOMBCONSTANTE, DESCCONSTANTE, INDTIPOCONSTANTE, VALORCONSTANTE, INDMANTENIMIENTOUSUARIO, ACTIVO, FECMODIF, USUARIO_ID) +values (CONSTANTE_SEQ.nextval,'EMPRESA_GENERA_FACTURA_ELETRONICA_SICFE','EMPRESAS HABILITADAS PARA GERAR FACTURA ELETRONICA - SICFE',1, 232, 1, 1, sysdate, 1); + + EXCEPTION WHEN unique_violation THEN NULL; +END +$$; +