Merge pull request 'Adição de empresa no contrato corporativo feat bug#AL-4833' (!196) from AL-4833 into master

Reviewed-on: utilidades/Flyway#196
Reviewed-by: pinheiro <valdevir@rjconsultores.com.br>
master
fabio 2024-09-10 17:30:51 +00:00
commit 14500154b3
5 changed files with 68 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.92.1</version> <version>1.92.2</version>
<distributionManagement> <distributionManagement>
<repository> <repository>

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

View File

@ -0,0 +1,18 @@
declare
object_exists exception;
except_02275 exception;
except_02270 exception;
except_02261 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_02275 , -02275);
pragma exception_init (except_02270 , -02270);
pragma exception_init (except_02261 , -02261);
begin
execute immediate 'ALTER TABLE contrato_corporativo ADD CONSTRAINT fk_empresa_contrato_corp FOREIGN KEY (empresa_id) REFERENCES empresa(empresa_id)';
exception
when object_exists then null;
when except_02275 then null;
when except_02270 then null;
when except_02261 then null;
end;

View File

@ -0,0 +1,18 @@
declare
object_exists exception;
except_02275 exception;
except_02270 exception;
except_02261 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_02275 , -02275);
pragma exception_init (except_02270 , -02270);
pragma exception_init (except_02261 , -02261);
begin
execute immediate '...';
exception
when object_exists then null;
when except_02275 then null;
when except_02270 then null;
when except_02261 then null;
end;

View File

@ -0,0 +1,16 @@
-- ALTER TABLE ADD COLUMN
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 '...';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;