AdmMono/src/db/migration/V20170113_1758__mantis8466.sql

7 lines
330 B
SQL

declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'ALTER TABLE CAJA_DIVERSOS ADD CONSTRAINT FK_NC_PACOTE FOREIGN KEY (NOTACREDITOVENDAPACOTE_ID) REFERENCES NOTA_CREDITO_VENDA_PACOTE (NOTACREDITOVENDAPACOTE_ID)';
exception when object_exists then null;
end;