Toad World® Forums

Why toad does not create foreign keys?

Good afternoon.

I have Toad version 5.0.5.31. I created a conceptual schema of the database. After that, I converted this scheme to the logical database schema for mssql 2008. Next, I made ​​the verification and found that I have no errors. I generated DDL script. Unfortunately, the script did not contain the sql to create foreign keys. Another sql code was generated correctly. Note, I checked “relationships” in options.

P.S. I generated like sql code by Toad 4. Previously this function worked.

Note, I see right sql code, when I click on the relation in physical scheme.

Hi,

Thank you for reporting this issue and sorry for this inconvenience, which is caused by that Generate checkbox is not selected automatically on relationships after LER to PER conversion.

Change request 110871 was created and will be fixed in the next BETA or Commercial version. Meanwhile, you can work around this issues by using our custom macro available at www.toadworld.com/.../392.aspx.

Download the package and put it in c:\Program Files (x86)\Quest Software\Toad Data Modeler 5.0\Packages\User.

Restart TDM and under the Macros menu you will get a new group Set Generate. Then choose any one of them to do the job for you.

Regards,

Lukas

Anyway, another option is to use Universal Data Model to create your conceptual schemas and convert this to the desired platform. Universal Data Model also allows to see migration of PK attributes, on the other hand it does not allow inheritance.

Regards,

Lukas

Hi,

Next BETA 5.2.3 will include fix to this issue.

Regards,

Lukas