AdmMono/src/db/migration/V20180305_0925__mantis10642...

13 lines
419 B
SQL

begin
execute immediate 'delete from PRECIO_FIXO_PEDAGIO where PRACAPEDAGIO_ID not in (select CASETAPEAJE_ID from caseta_peaje)';
exception when others then null;
end;
/
begin
execute immediate 'alter table PRECIO_FIXO_PEDAGIO add constraint PRACAPEDGAIO_CASETA foreign key("PRACAPEDAGIO_ID") references "CASETA_PEAJE"("CASETAPEAJE_ID")';
exception when others then null;
end;
/