git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@78500 d1611594-4594-4d17-8e1d-87c2c4800839
master
lucas.taia 2018-01-30 22:05:47 +00:00
parent ce05c67887
commit 51b3206ac6
5 changed files with 119 additions and 0 deletions

View File

@ -0,0 +1,67 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE BPE
(
BPE_ID NUMBER(7,0),
TIPOAMB NUMBER(1,0),
UF VARCHAR2(2 BYTE),
VERSAOAPLICACAO VARCHAR2(20 BYTE),
CODSTAT VARCHAR2(3 BYTE),
MOTIVO VARCHAR2(255 BYTE),
RETORNO_ID VARCHAR2(20 BYTE),
CHBPE VARCHAR2(44 BYTE),
DHRECBTO VARCHAR2(25 BYTE),
NPROT VARCHAR2(15 BYTE),
INDCONTINGENCIA NUMBER(1,0),
ACTIVO NUMBER(1,0),
FECMODIF DATE,
USUARIO_ID NUMBER(7,0)
)';
execute immediate 'CREATE SEQUENCE "BPE_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1';
exception when object_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BPE ADD (BOLETO_ID NUMBER(15))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BPE ADD (VERSAO VARCHAR2(8))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BPE ADD (CNPJ VARCHAR2(14))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BPE ADD (QRCODE VARCHAR2(255))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BPE ADD (CBP VARCHAR2(8))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE INSCRICAO_ESTADUAL ADD (INDBPE NUMBER(1))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BPE ADD (ERROCONTINGENCIA VARCHAR2(255))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,31 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE ESTACION ADD (INDBPE NUMBER(1) DEFAULT 0)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE EMPRESA_IMPOSTO ADD (INDBPE NUMBER(1) DEFAULT 0)';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BPE ADD (INDBPEEMPRESA NUMBER(1))';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BPE ADD (INDBPEESTACAO NUMBER(1))';
exception when column_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE BPE ADD (INDBPEUF NUMBER(1))';
exception when column_exists then null;
end;