Merge pull request 'Bolivariano - Autorização de viagem fixes bug#AL-4453' (!157) from AL-4453 into master

Reviewed-on: utilidades/Flyway#157
Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>
master
leonardo.bolivariano 2024-07-24 21:20:27 +00:00
commit 67478dd0bf
3 changed files with 115 additions and 83 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>Flyway</artifactId>
<version>1.75.2</version>
<version>1.76.0</version>
<distributionManagement>
<repository>
@ -79,5 +79,4 @@
</dependency>
</dependencies>
</project>
</project>

View File

@ -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 CATEGORIA ADD INDEMITEFORMAUTORIZACAO NUMBER(1,0)';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;

View File

@ -0,0 +1,18 @@
-- CREATE TABLE/CREATE SEQUENCE
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE TABLE CATEGORIA_FORM_AUTORIZACAO (
CATEGORIA_ID NUMBER(7,0),
EMPRESA_ID NUMBER(7,0),
TEXTO CLOB,
ACTIVO NUMBER(1,0),
USUARIO_ID NUMBER(7,0),
FECMODIF DATE,
PRIMARY KEY ( CATEGORIA_ID, EMPRESA_ID),
CONSTRAINT "fk_categoriafrmautorizacao_categoria" FOREIGN KEY ("CATEGORIA_ID") REFERENCES "CATEGORIA"("CATEGORIA_ID"),
CONSTRAINT "fk_categoriafrmautorizacao_empresa" FOREIGN KEY ("EMPRESA_ID") REFERENCES "EMPRESA"("EMPRESA_ID")
)';
exception when object_exists then null;
end;