Compare User Objects: wrong DDL (again)

Maxmix

Member³
25672hd.png


Connected as ZMM, I am comparing tables belonging to schema CONTRACTS. There is FK constraint in one db, referring to table in another schema SHAL.
As you can see from the screenshot, referred table is not qualified with schema name (should be references SHAL.KONTRAGENTY).
This is bad. But really bad things happen when I start applying sync script:

SQL:
rem Differences between CONTRACTS@EGP and CONTRACTS@NOVOSIB, created on 20.08.2013
rem Press Apply button, or run in Command Window or SQL*Plus connected as ZMM@NOVOSIB

----------------------------------
--  Changed table icontractors  --
----------------------------------
-- Create/Recreate primary, unique and foreign key constraints
alter table CONTRACTS.ICONTRACTORS
  add constraint FK_IORG foreign key (ORG_ID)
  references CONTRACTS.KONTRAGENTY (KNA_ID);

I saw such things so many times. How can I explain that unqualified identifiers are bad?

 
Back
Top