AdmMono/src/db/migration/V20170424_1741__mantis8921.sql

19 lines
604 B
SQL

declare
object_exists exception;
except_02275 exception;
except_02270 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_02275 , -02275);
pragma exception_init (except_02270 , -02270);
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;
when except_02275 then null;
when except_02270 then null;
end;