fixes bug#22352

qua:
dev:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@106836 d1611594-4594-4d17-8e1d-87c2c4800839
master
walace 2021-05-24 20:20:22 +00:00
parent e7a3b7ff83
commit 31449e95cd
2 changed files with 123 additions and 1 deletions

View File

@ -0,0 +1,122 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE CONEXION_RUTA_CONF
(CONEXIONRUTACONF_ID NUMBER(7,0) NOT NULL ENABLE,
ACTIVO NUMBER(1,0),
FECMODIF DATE,
USUARIO_ID NUMBER(7,0),
DESCRICAO VARCHAR2(100),
PRIMARY KEY (CONEXIONRUTACONF_ID) ENABLE
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE CONEXION_RUTA_CONF_SEQ MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1 START WITH 101 CACHE 20 NOORDER NOCYCLE';
exception when object_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CONEXION_RUTA_CTRL ADD (CONEXIONRUTACONF_ID NUMBER(7,0))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
except_02275 exception;
pragma exception_init (column_exists , -01430);
pragma exception_init (column_exists , -02275);
begin
execute immediate 'ALTER TABLE CONEXION_RUTA_CTRL ADD CONSTRAINT FK_CONEXION_RUTA_CONF FOREIGN KEY (CONEXIONRUTACONF_ID)
REFERENCES CONEXION_RUTA_CONF(CONEXIONRUTACONF_ID)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CONEXION_RUTA_CONF ADD (TIEMPOMIN NUMBER(7,0))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CONEXION_RUTA_CONF ADD (TIEMPOMAX NUMBER(7,0))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CONEXION_RUTA_CTRL ADD (CONEXIONRUTACONF_ID NUMBER(7,0))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CONEXION_RUTAEXCEPCIONTIPOPTA ADD (CONEXIONRUTACONF_ID NUMBER(7,0))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE CONEXION_RUTA_EXCEPCION_PTOVTA ADD (CONEXIONRUTACONF_ID NUMBER(7,0))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
except_02275 exception;
pragma exception_init (column_exists , -01430);
pragma exception_init (column_exists , -02275);
begin
execute immediate 'ALTER TABLE CONEXION_RUTAEXCEPCIONTIPOPTA ADD CONSTRAINT FK_CONEXION_RUTACONF_TPPTA FOREIGN KEY (CONEXIONRUTACONF_ID)
REFERENCES CONEXION_RUTA_CONF(CONEXIONRUTACONF_ID)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
except_02275 exception;
pragma exception_init (column_exists , -01430);
pragma exception_init (column_exists , -02275);
begin
execute immediate 'ALTER TABLE CONEXION_RUTA_EXCEPCION_PTOVTA ADD CONSTRAINT FK_CONEXION_RUTACONF_PTOVTA FOREIGN KEY (CONEXIONRUTACONF_ID)
REFERENCES CONEXION_RUTA_CONF(CONEXIONRUTACONF_ID)';
exception when column_exists then null;
end;
/

View File

@ -8,7 +8,7 @@ begin
ACTIVO NUMBER(1,0), ACTIVO NUMBER(1,0),
FECMODIF DATE, FECMODIF DATE,
USUARIO_ID NUMBER(7,0), USUARIO_ID NUMBER(7,0),
DESCRICAO VARCHAR2(100) BYTE, DESCRICAO VARCHAR2(100),
PRIMARY KEY (CONEXIONRUTACONF_ID) ENABLE PRIMARY KEY (CONEXIONRUTACONF_ID) ENABLE
)'; )';
exception when object_exists then null; exception when object_exists then null;