Add PK based on prefix+"_"+entity name+"_"+attribute name in the macro


I have a model I reversed engineered from MS SQL. Each table/entity has an ID field/attribute as well as PublicID. I would like to write a macro( or use one from an example if exist) for either selected or all entities to create a PK for ID fields and BK for PublicID fields.


  • I'm not sure what a BK is, but there is a sample macro called Create Index on FK Columns you can use as a basis for your requirements.  To create the PK, you would need to set the PrimaryKey property of the attribute named "PublicID" to true to create the Primary key.

Reply Children
No Data