bug#00000

dev:lucas

qua: scripts Ebus

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@104693 d1611594-4594-4d17-8e1d-87c2c4800839
master
lucas.taia 2020-12-11 23:54:52 +00:00
parent d6bd86713e
commit af174524eb
1 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,95 @@
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE GP_PRICING ADD (STATUS VARCHAR2(2) )';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE GP_PRICING ADD (INDCUPOMDESCONTO NUMBER(1) )';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE GP_PRICING ADD (DESCUENTOPORCENTAJEVOLTA NUMBER(7,2) ) ';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE GP_PRICING_IMPORTE ADD (DESCUENTOPORCENTAJEVOLTA NUMBER(7,2) )';
exception when column_exists then null;
end;
/
declare
column_exists exception;
pragma exception_init (column_exists , -01430);
begin
execute immediate 'ALTER TABLE GP_PRICING_IMPORTE ADD (DESCUENTOPORCREDONDO NUMBER(7,2) )';
exception when column_exists 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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, USUARIO_ID) VALUES (FUNCION_SISTEMA_SEQ.NEXTVAL, ''1'', ''EBUS > PRICING ESPECIALISTA'', ''COM.RJCONSULTORES.EBUS.GUI.PRICING.ESPECIALISTA'', ''1'', ''1'')';
exception
when dup_val_on_index then null;
when except_02291 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 FUNCION_SISTEMA (FUNCIONSISTEMA_ID, SISTEMA_ID, NOMBFUNCION, DESCRUTA, ACTIVO, USUARIO_ID) VALUES (FUNCION_SISTEMA_SEQ.NEXTVAL, ''1'', ''EBUS > PRICING GESTOR', 'COM.RJCONSULTORES.EBUS.GUI.PRICING.GESTOR'', ''1'', ''1'')';
exception
when dup_val_on_index then null;
when except_02291 then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE TABLE gestao_operador (
gestaooperador_id NUMBER(7) NOT NULL,
usuario_id NUMBER(7),
porcentaje NUMBER(7, 2),
valor NUMBER(7, 2),
activo NUMBER(1),
fecmodif DATE,
usuariomodif_id NUMBER(7),
CONSTRAINT gestao_operador_pk PRIMARY KEY ( gestaooperador_id ) ENABLE )';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate
'CREATE SEQUENCE GESTAO_OPERADOR_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';
exception when object_exists then null;
end;