Merge pull request 'Script para inserir menu e tela de tipo de documento. fixes bug #AL-4655' (!176) from AL-4655 into master

Reviewed-on: utilidades/Flyway#176
Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>
master
pinheiro 2024-08-14 19:46:27 +00:00
commit f86de8c688
3 changed files with 51 additions and 1 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId> <groupId>br.com.rjconsultores</groupId>
<artifactId>Flyway</artifactId> <artifactId>Flyway</artifactId>
<version>1.81.1</version> <version>1.81.2</version>
<distributionManagement> <distributionManagement>
<repository> <repository>

View File

@ -0,0 +1,13 @@
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,1,''ADM > CATALOGO > TIPODOCUMENTO'', ''COM.RJCONSULTORES.ADMINISTRACION.GUI.CATALOGO.MENU.TIPODOCUMENTO'',1,SYSDATE,-1)';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;

View File

@ -0,0 +1,37 @@
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 TIPO_IDENTIFICACION ADD INDEXIBECONFIRMACAOTOTALBUS NUMBER(1,0)';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE "TIPO_IDENTIFICACION_SEQ" MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE';
exception when object_exists then null;
end;
/
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 'UPDATE TIPO_IDENTIFICACION SET INDEXIBECONFIRMACAOTOTALBUS = 1';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;