Bolivariano - Adequações Conexão entre linhas feat bug#AL-4465

master
valdir.cordeiro 2024-08-23 10:03:27 -03:00
parent efc5360832
commit 74f00a7ed1
3 changed files with 77 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,47 @@
-- 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))';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;
/
-- 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 (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;
/
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;