Toad World® Forums

Primary key names conventions and relationship based index names conventions - can they be overridden?

I want to always set the primary key name for my tables using the pattern: PK_. Ideally the app would sync the name whenever I change the table name. Is it doable? If yes, how can I do it?

Also, I want to change the index names for indexes created from relationships to IX__ instead of IX_Relationship1, IX_Relationship2 etc. Again, is it doable? If yes, how?
Thank you!

Hello Costabas,

  1. Default Name for Primary Keys. Unfortunately in Toad Data Modeler you can define default name, but TDM doesn’t recognize primary key and non primary key. I think your request has sense, so I Created issue on this TDM-3966 and you can track it in release notes.

  2. You can define default name for foreign indexes in Main Menu - Settings - Options - Physical Model - General. There is “Index to Foreign Key Name”. For Table name is app. variable <%OwnerName%>, but there are not variable for field name, because index can have more than one attribute.

My recommendation is use some simple macro that can change name to your form very easy. In Toad Data Modeler you can write many macros in JScript.