Setting the default value of a column after making it NOT NULL

I am new to TDM so forgive me if this is a rookie question. I searched yet didn’t find any answers to this issue.

I have reverse engineered our ‘very’ old database and am now modeling it for our new system. There are over 200 tables. I have changed all my data types to our new proper standardization (CHAR to VARCHAR for example) and have reached an issue. We are not going to allow NULL values for most of our fields, so for a VARCHAR I have selected NOT NULL and want to set the default value to ‘’. I can do this by clicking on each field in the entity properties window and setting the value, but with all of the columns and tables I have, this will take quite some time.

Is there a quick way to set the default values of many columns in TDM or should I stick with just text editing the raw SQL and reimporting the model back in? I thinking there has to be some way I have not found to bulk change the data types in an existing model.

Thanks in advance.

Ben

Yes - TDM supports a complete macro interface where you can easily code such mass corrections.

thanks, I’ll look into that section next!

Hi,

you can find valuable information in Help file:

List of objects and object properties is available in Reference Guide. Click Expert Mode | Reference Guide to open it.

Tip: you can use Eclipse IDE for writing scripts. In the following article you can find more information about available snippets.

http://www.toadworld.com/products/toad-data-modeler/b/weblog/archive/2014/02/06/eclipse-snippets-for-macros-and-scripts.aspx

Good Luck!