wilian 2017-04-25 21:29:33 +00:00
parent c7a79fe534
commit 42a464ae4c
4 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'ALTER TABLE CAJA_DIVERSOS_PAGO ADD OCD_ID NUMBER(15,0)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,9 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'ALTER TABLE CAJA_DIVERSOS_PAGO
ADD CONSTRAINT FK_CAJA_DIVERSOS_PAGO_OCD FOREIGN KEY (OCD_ID)
REFERENCES OCD (OCD_ID)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'ALTER TABLE CAJA_DIVERSOS_PAGO ADD NOTACREDITOVENDAPACOTE_ID NUMBER(7,0)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,9 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'ALTER TABLE CAJA_DIVERSOS_PAGO
ADD CONSTRAINT FK_CAJA_DIVERSOS_PAGO_NC FOREIGN KEY (NOTACREDITOVENDAPACOTE_ID)
REFERENCES NOTA_CREDITO_VENDA_PACOTE (NOTACREDITOVENDAPACOTE_ID)';
exception when object_exists then null;
end;