Toad World® Forums

rename indexes and FKs


#1

Because I found nothing working in this domain, I had to learn about TDM scripting. And finally got 2 working scripts which may be usefull for others.
So… here is my little contribution.

Both scripts sets captions and names. Captions are build from object captions. Names - from object names. You may configure max length of name and decide to convert to lowercase or not.

name formats
ix_entity_field1_field2_etc - for regular index
ux_entity_field1_field2_etc - for unique index
fk_parent_child
or optionaly
fk_parent_child_childname1_childname2_etc

Written and tested for TDM 3.6.6.7

RegenerateFKNames.js (4.05 KB)

RegenerateIndicesNames.js (4.54 KB)


#2

This looks like what I have been looking for… but I can not find a way to add or open the script inside the data modeler and run it?

Also, this post and scripts are from 2010… Why isn’t this or something similar included in TDM by now?

Thanks for any help.