Merge pull request 'Bolivariano - Adequações Conexão entre linhas feat bug#AL-4465' (!184) from AL-4465 into master

Reviewed-on: http://18.235.188.113:3000/utilidades/Flyway/pulls/184
Reviewed-by: pinheiro <valdevir@rjconsultores.com.br>
master
Valdir Cordeiro 2024-08-23 13:30:06 +00:00
commit d9c548e3cd
4 changed files with 59 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.86.0</version> <version>1.87.0</version>
<distributionManagement> <distributionManagement>
<repository> <repository>

View File

@ -0,0 +1,29 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE TABLE BLOQUEIO_CONEXAO (
BLOQUEIOCONEXAO_ID NUMBER(15,0) NOT NULL,
RUTA_ID NUMBER(7,0),
CORRIDA_ID NUMBER(7,0),
FECCORRIDA DATE,
ISBLOQUEADO NUMBER(1,0),
CONEXIONRUTACONF_ID NUMBER(7,0),
ORIGEM_ID NUMBER(7,0),
DESTINO_ID NUMBER(7,0),
ACTIVO NUMBER(1,0),
FECMODIF DATE,
USUARIO_ID NUMBER(7,0),
CONSTRAINT BLOQUEIO_CONEXAO_PK PRIMARY KEY (BLOQUEIOCONEXAO_ID)
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE BLOQUEIO_CONEXAO_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists 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 'ALTER TABLE CONEXION_RUTA_CONF ADD (ISBLOQUEIOTRECHO_A NUMBER(1,0), ISBLOQUEIOTRECHO_B NUMBER(1,0), ISBLOQUEIOTRECHO_C NUMBER(1,0), PORCENTAGEM_OCUPACAO NUMBER(7,0), MINUTOS_ANTES_PARTIDA 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,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 CUSTOM (CUSTOM_ID, SISTEMA, CHAVE, VALOR, TIPO, ACTIVO, ORDEM, FECMODIF, USUARIO_ID)
VALUES (CUSTOM_SEQ.nextval, 1, ''usaBloqueioTrechoConexao'', 0, 1, 1, 0, sysdate, 1)';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;